Python 从依赖项链接安装包时出现问题
这是我的setup.py:Python 从依赖项链接安装包时出现问题,python,pip,setuptools,Python,Pip,Setuptools,这是我的setup.py: 设置( ... install_requires=['gedthrifstubs'], 依赖关系链接=['git+ssh://user@git.server.com/ged thrift stubs.git#egg=gedthrifstubs'], ...) 然后我创建包: python setup.py sdist 然后我尝试安装它: pip安装file://path/package-0.0.1.tar.gz 把这个放进候机楼: Downloading/unpa
设置(
...
install_requires=['gedthrifstubs'],
依赖关系链接=['git+ssh://user@git.server.com/ged thrift stubs.git#egg=gedthrifstubs'],
...)
然后我创建包:
python setup.py sdist
然后我尝试安装它:
pip安装file://path/package-0.0.1.tar.gz
把这个放进候机楼:
Downloading/unpacking GEDThriftStubs (from package==0.0.1)
Could not find any downloads that satisfy the requirement GEDThriftStubs (from package==0.0.1)
No distributions at all found for GEDThriftStubs (from package==0.0.1)
在pip.log消息中,如下所示:
Skipping link git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)
git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs-0.0.1
我的项目中没有确切的名字“GedthrifstTubs”,如果有关系的话
但这很好:
pip install git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs
尝试:
$pip安装--进程依赖项链接file://path/package-0.0.1.tar.gz
请注意,此标记已从pip 1.6中的pip
中删除。了解更多信息
在PIP1.5中,处理依赖项链接被弃用,并在PIP1.6中被完全删除
还有一个关于pip和依赖项链接的问题
如果这不起作用,您可能还需要在链接上添加版本后缀,如下所示:
Skipping link git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)
git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs-0.0.1
其中
0.0.1
是ged储蓄存根的setup.py中指定的版本
啊,对不起,我错了。您是在尝试sudo python setup.py sdist
还是只尝试python setup.py sdist
?我在一个用户下和一个虚拟机内运行这两个命令,而不使用sudo。可能重复的