Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/350.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为什么setuptools不理解git+;https URL?_Python_Git_Setuptools - Fatal编程技术网

Python 为什么setuptools不理解git+;https URL?

Python 为什么setuptools不理解git+;https URL?,python,git,setuptools,Python,Git,Setuptools,根据git可以在dependency\u链接setup的参数中使用git+URL指定存储库URL。然而 cd /tmp mkdir py-test cd py-test touch __init__.py 创建一个setup.py文件 from setuptools import setup, find_packages from pkg_resources import parse_version setup( name = "py-test", version = "1.

根据
git
可以在
dependency\u链接
setup
参数中使用
git+URL
指定存储库URL。然而

cd /tmp
mkdir py-test
cd py-test
touch __init__.py
创建一个
setup.py
文件

from setuptools import setup, find_packages
from pkg_resources import parse_version

setup(
    name = "py-test",
    version = "1.0",
    packages = ["."],
    dependency_links = [
        "git+https://github.com/wxWidgets/wxPython.git"
    ],
    install_requires = ["wxPython"],
)
导致git上的错误
下载错误+https://github.com/wxWidgets/wxPython.git: 未知url类型:git+https--可能找不到某些包当我运行
python setup.py build和&sudo setup.py install

安装包
python setuptools git
没有帮助

我正在Ubuntu 15.04上使用
setuptools
18.2和
python
2.7

在VCS签出的情况下,您还应该附加#egg=项目版本,以确定应该使用哪个签出包

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

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

仅供参考,如果从pip安装,您需要
版本
部分,并且它需要是一个数字。e、 g.
#egg=wxPython-1.0