The Python Oracle

How to install Python package from GitHub?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Meadow

--

Chapters
00:00 Question
00:45 Accepted answer (Score 514)
01:15 Answer 2 (Score 125)
01:38 Thank you

--

Full question
https://stackoverflow.com/questions/1526...

Question links:
https://github.com/jkbr/httpie
https://pypi.python.org/pypi/httpie

Accepted answer links:
[VCS Support]: https://pip.pypa.io/en/stable/topics/vcs.../
[explicitly name the project]: https://pip.pypa.io/en/stable/cli/pip_in...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pip

#avk47



ACCEPTED ANSWER

Score 563


You need to use the proper git URL:

pip install git+https://github.com/jkbr/httpie.git#egg=httpie

Also see the VCS Support section of the pip documentation.

Don’t forget to include the egg=<projectname> part to explicitly name the project; this way pip can track metadata for it without having to have run the setup.py script.




ANSWER 2

Score 136


To install Python package from github, you need to clone that repository.

git clone https://github.com/jkbr/httpie.git

Then just run the setup.py file from that directory,

sudo python setup.py install