描述你的环境
问题
1) setup.py内部调用回购->安装CaaS包:
```javascriptinstall_requires=[
'CaaS>=1.0'],
dependency_links=[
'https://<private_repo>#egg=CaaS-1.0'],
``` 2) Installing invocations in a virtualenv python setup.py install3)正确安装CaaS。`
(test_1) c4b301cf5d25:invocations quj291$ pip freeze
CaaS==1.0So far everything works.
4) Created a Pipfile [requires]
python_version = '2.7'
[packages]
invocations = { git = 'git://<private-repo>/invocations', ref = 'master' }5) Fails to install invocations because CaaS package cannot be found: pipenv install Collecting CaaS>=1.0 (from invocations)
Could not find a version that satisfies the requirement CaaS>=1.0 (from invocations) (from versions: )
No matching distribution found for CaaS>=1.0 (from invocations)6) Tried pipenv install --verboseCollecting CaaS>=1.0 (from invocations)
1 location(s) to search for versions of CaaS:
* https://pypi.python.org/simple/caas/
Getting page https://pypi.python.org/simple/caas/
Looking up "https://pypi.python.org/simple/caas/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/caas/ HTTP/1.1" 404 33
Status code 404 not in [200, 203, 300, 301]
Could not fetch URL https://pypi.python.org/simple/caas/: 404 Client Error: Not Found (caas does not exist) for url: https://pypi.python.org/simple/caas/ - skipping
Cleaning up...尝试从pypi获取CaaS,而不是私有github回购的inside dependency_links of inside‘s setup.py
这是意料之中吗?如何安装CaaS软件包?
谢谢!
发布于 2018-01-21 17:35:53
在setup.py中,在dependency_links中添加git+ (以及分支名称@master)
setup(
...
dependency_links=[
"git+https://<repo>.git@master#egg=CaaS-1.0",
],
...
)使用pipenv
$ cd <dir_with_above_setup_py>
# enable pip flag --process-dependency-links
$ export PIP_PROCESS_DEPENDENCY_LINKS=1
$ pipenv install [-e] .这几天我自己弄明白了。查看我的GitHub、repos、PipenvApp和PipenvDependency。请记住,这是用Python 3测试的。
侧注:--process-dependency-links标志是/弃用,请参见和平执行方案问题#3939和和平执行方案问题#4187
发布于 2017-10-16 18:18:47
在PyPI:https://pypi.python.org/pypi/CaaS中没有这样的包
找不到错误404。
https://stackoverflow.com/questions/46776278
复制相似问题