从 github repo 导入包的成功方法是什么?
这是我尝试过的
尝试安装 python 包-corepkg,它在 git 存储库中可用-git.example.com/corepkg.git
在另一个 Project-Proj2 中,为了从上面的 corepkg 包中导入逻辑,在 requirements.txt 中保留一个条目并运行以下 pip 命令。
pip install -r requirements.txt
这是我在proj2的requirements.txt中的条目
...
PyYAML==3.12
requests==2.18.4
urllib3==1.22
git+https://git.example.com/corepkg.git@develop
但是它没有在虚拟环境站 pip 包中创建任何 src 文件夹或 .dist-info 文件夹?
它只是创建了 corepkg-1-py3.6.egg_info 文件,而不是导入所需的文件。
我在这里缺少从 git 成功导入它的步骤是什么?
最佳答案
尝试
git+https://git.example.com/corepkg.git@develop#egg=corepkg
见 https://pip.readthedocs.io/en/stable/reference/pip_install/#vcs-support
问题也可能出在
corepkg.git
repo 所以很难说不看 repo 。
关于python-3.x - 使用requirements.txt从github安装python包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47565028/