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