Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install python package from github using requirements.txt

Whats the successful way to import packages from github repo?

Here is what I tried Tried Installing a python package- corepkg, which is available in git repository - git.example.com/corepkg.git

In another Project- Proj2, to import logic from above corepkg package, Kept an entry in requirements.txt and ran the following pip command.

pip install -r requirements.txt

Here are my Entries in requirement.txt for Proj2

...
PyYAML==3.12
requests==2.18.4
urllib3==1.22
git+https://git.example.com/corepkg.git@develop

But it did not create any src folder or .dist-info folder in virtual environment site-packages? It just created corepkg-1-py3.6.egg_info file but not files required to import.

Whats the step I am missing here to import it successfully from git?

like image 260
Santhosh Nagulanchi Avatar asked Nov 30 '17 02:11

Santhosh Nagulanchi


1 Answers

Try

git+https://git.example.com/corepkg.git@develop#egg=corepkg

See https://pip.readthedocs.io/en/stable/reference/pip_install/#vcs-support

The problem also could be in the very corepkg.git repo so it's hard to say something without looking at the repo.

like image 167
phd Avatar answered Oct 21 '22 09:10

phd