我正在使用SetupTools构建一个我自己的包裹。在INSTALL_REQUIRES中的setup.py中,我有以下依赖关系:
...
INSTALL_REQUIRES = [
'ray>=0.8.7',
'pyyaml>=5.3',
]
setup(name=PACKAGE_NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type=LONG_DESC_TYPE,
author=AUTHOR,
license=LICENSE,
author_email=AUTHOR_EMAIL,
url=URL,
install_requires=INSTALL_REQUIRES,
packages=find_packages()
)当我运行pip3 install -i https://test.pypi.org/simple/ r3po==0.0.6时,会得到以下错误:
ERROR: Could not find a version that satisfies the requirement pyyaml>=5.3 (from r3po==0.0.6) (from versions: 3.11)
ERROR: No matching distribution found for pyyaml>=5.3 (from r3po==0.0.6)然而,pip3 search pyyaml向我展示了PyYAML确实存在:
PyYAML (5.3.1) - YAML parser and emitter for Python
pip3 install pyyaml (在安装了pyyaml的.venv中)
Requirement already satisfied: pyyaml in /home/lieu/dev/inzura-clustering-project/.venv/lib/python3.8/site-packages (5.3.1)
在你问之前--是的,我试过了PyYAML,pyyaml,5.3.1,5.3等等的所有组合,但是没有什么效果。我甚至试图删除版本要求(所以是INSTALL_REQUIRES=['ray>=0.87','pyyaml']),但这会导致另一个错误:
ERROR: Command errored out with exit status 1:
command: /home/lieu/dev/r3po/sample/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w32z04mo/pyyaml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w32z04mo/pyyaml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-w32z04mo/pyyaml/pip-egg-info
cwd: /tmp/pip-install-w32z04mo/pyyaml/
Complete output (7 lines):
running egg_info
creating /tmp/pip-install-w32z04mo/pyyaml/pip-egg-info/PyYAML.egg-info
writing /tmp/pip-install-w32z04mo/pyyaml/pip-egg-info/PyYAML.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-w32z04mo/pyyaml/pip-egg-info/PyYAML.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-w32z04mo/pyyaml/pip-egg-info/PyYAML.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-w32z04mo/pyyaml/pip-egg-info/PyYAML.egg-info/SOURCES.txt'
error: package directory 'lib3/yaml' does not exist发布于 2020-10-08 02:19:46
安东尼·索蒂尔关于使用--extra-index-url的建议对我很有帮助。
https://stackoverflow.com/questions/63650010
复制相似问题