为什么setuptools不理解git+https的url?

2024-10-01 11:39:26 发布

您现在位置:Python中文网/ 问答频道 /正文

根据Dependency section in the setuptools manualgit,可以在dependency_links参数中使用git+URL将存储库URL指定给setup。但是

cd /tmp
mkdir py-test
cd py-test
touch __init__.py

以及创建一个setup.py文件

^{pr2}$

当我运行python setup.py build && sudo setup.py install时,导致错误Download error on git+https://github.com/wxWidgets/wxPython.git: unknown url type: git+https -- Some packages may not be found!。在

安装包python-setuptools-git没有帮助。在

我在Ubuntu15.04上使用了setuptools18.2和python2.7。在


Tags: theinpyhttpstestgiturlsetup
1条回答
网友
1楼 · 发布于 2024-10-01 11:39:26

setuptools docs

In the case of a VCS checkout, you should also append #egg=project-version in order to identify for what package that checkout should be used

因此,修复方法是将#egg=wxPython片段附加到末尾:

dependency_links = [
    "git+https://github.com/wxWidgets/wxPython.git#egg=wxPython"
]

相关问题 更多 >