I’ve taken to using pipenv (“Python Development Workflow for Humans”) recently and so I frequently come across things I haven’t done previously and need to figure out how to. Todays’s is using pipenv to install a package from a github repository.
How do you do that ?
So, short and sweet, here’s how. In my case I have forked the repos ‘behave-web-api‘ and I want to install my forked version into my current project.
$ pipenv install -e git+ssh://firstname.lastname@example.org/shearichard/behave-web-api.git#egg=behave-web-api
Notice the git+ssh is used as the scheme of the url. Also notice that the
egg=behave-web-api (with the value after the equals sign changed to whatever package you’re dealing with) is necessary .
The pipenv doco for this is comprehensive but because it’s so comprehensive is a little more than you might need in a lot of cases. I also found the note written to himself by Koen Woortman a useful pointer.