7

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?

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.