Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guide: add example to install from git branch or tag #2685

Closed
glensc opened this issue Aug 1, 2018 · 12 comments
Closed

guide: add example to install from git branch or tag #2685

glensc opened this issue Aug 1, 2018 · 12 comments
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! Type: Documentation 📖 This issue relates to documentation of pipenv.

Comments

@glensc
Copy link

glensc commented Aug 1, 2018

Is your feature request related to a problem? Please describe.

https://realpython.com/pipenv-guide/#example-usage

please add here example how to add package from git branch "develop" or tag "1.0.0". it is not obvious for persons who started to use pipenv and not familiar with python ecosystem.

@uranusjr uranusjr added Type: Documentation 📖 This issue relates to documentation of pipenv. good first issue Issues suitable as a newcomer to get familiar with Pipenv! labels Aug 1, 2018
@techalchemy
Copy link
Member

We don't control that website, unfortunately, but if it's not become clear to you yet you can do this from the command line with pipenv install -e git+https://github.com/user/repo.git@1.0.0#egg=project_name

@glensc
Copy link
Author

glensc commented Aug 2, 2018

appending @1.0.0 is not self-obvious. that's why example needed.

i tried &ref=develop, but eventually just used vim on Pipfile to specify ref.

@glensc
Copy link
Author

glensc commented Aug 2, 2018

such examples could be present in this project README.md as well.

@techalchemy
Copy link
Member

Yeah that is why we left this issue opened. We can’t control what other websites write in their user guides.

@akefeli
Copy link

akefeli commented Aug 3, 2018

Also it took me a while to figure out you needed to escape & in the url for subdirectory.
This doesn't work:
pipenv install -e git@github.com:some/repo.git#egg=foo&subdirectory=python
This works:
pipenv install -e git@github.com:some/repo.git#egg=foo\&subdirectory=python

@glensc
Copy link
Author

glensc commented Aug 3, 2018

you need to escape & for shell. so these are equivalent:

pipenv install -e "git@github.com:some/repo.git#egg=foo&subdirectory=python"
pipenv install -e 'git@github.com:some/repo.git#egg=foo&subdirectory=python'
pipenv install -e git@github.com:some/repo.git#egg=foo\&subdirectory=python

https://www.tldp.org/LDP/abs/html/special-chars.html

@akefeli
Copy link

akefeli commented Aug 3, 2018

@glensc you are right, for some reason I thought same command was working with pip but not with pipenv, I must be using quotes with pip

@techalchemy
Copy link
Member

I think we are all set on this front now (merged #2702) -- thanks for opening the issue and thanks for the helpful back and forth all!

@glensc
Copy link
Author

glensc commented Aug 17, 2018

#2702 is excellent, exactly what was missing!

@kushan-gunasekera
Copy link

This is how I solved it,

pipenv install -e git+https://github.com/some_user/some_package.git#egg=some_package

@ghost
Copy link

ghost commented Sep 4, 2019

How to checkout a tag and install from https://github.com/ccxt/ccxt. Also it is a js/php/py repo with python subfolder?
like pipenv install tagfoo in subfolder python which has setup.py

@coltonbh
Copy link

coltonbh commented Mar 21, 2020

If you want to install via ssh (say, for a private repo), you'll need to modify the GitHub ssh url as follows:

    git@github.com:coltonbh/my-package.git (fetch)
                  ^ change this to a '/' character

Correct:
git@github.com/coltonbh/my-package.git (fetch)

And the install looks like:

pipenv install -e "git+ssh://git@github.com/coltonbh/my-package.git@branch123#egg=mypgk"

Otherwise you'll get a very long install process followed by the cryptic error:

pipenv.patched.notpip._internal.exceptions.InstallationError: Command "git clone -q ssh://git@github.com:coltonbh/my-package.git /var/folders/w2/rkn1bm3d3ndclys0f81clbfw0000gn/T/requirementslib5mkvyj4m/mypgk" failed with error code 128 in None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! Type: Documentation 📖 This issue relates to documentation of pipenv.
Projects
None yet
Development

No branches or pull requests

6 participants