I am using SetupTools to build a package of my own. In INSTALL_REQUIRES in setup.py
I have the following dependencies:
...
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()
)
When I run pip3 install -i https://test.pypi.org/simple/ r3po==0.0.6
, I get the following error:
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)
However, pip3 search pyyaml
shows me that
PyYAML is definitely there:
PyYAML (5.3.1) - YAML parser and emitter for Python
and pip3 install pyyaml
(in a .venv
that has pyyaml
installed) gives
Requirement already satisfied: pyyaml in /home/lieu/dev/inzura-clustering-project/.venv/lib/python3.8/site-packages (5.3.1)
And before you ask --- yes, I've tried all combinations of PyYAML
, pyyaml
, 5.3.1
, 5.3
, and so on, but nothing has worked.
I even tried to remove the version requirement (so INSTALL_REQUIRES=['ray>=0.87','pyyaml']
) but this leads to another error:
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
Anthony Sottile's suggestion to use --extra-index-url
worked for me.