用朋友cocotools包时,直接用pip安装慢的一批,而且总是会因为网速等问题下载不下来。
报一堆错误:
ERROR: Command errored out with exit status 1:
command: /root/anaconda3/envs/pytorch/bin/python /root/anaconda3/envs/pytorch/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6kxh4zax/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython>=0.27.3' oldest-supported-numpy 'setuptools>=43.0.0' wheel
cwd: None
Complete output (10 lines):
Collecting cython>=0.27.3
Downloading Cython-0.29.26-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting oldest-supported-numpy
Downloading oldest_supported_numpy-0.15-py3-none-any.whl (3.8 kB)
Collecting setuptools>=43.0.0
Downloading setuptools-60.5.0-py3-none-any.whl (958 kB)
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
ERROR: Could not find a version that satisfies the requirement numpy==1.14.5; python_version == "3.7" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy" (from oldest-supported-numpy) (from versions: none)
ERROR: No matching distribution found for numpy==1.14.5; python_version == "3.7" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy" (from oldest-supported-numpy)
----------------------------------------
ERROR: Command errored out with exit status 1: /root/anaconda3/envs/pytorch/bin/python /root/anaconda3/envs/pytorch/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6kxh4zax/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cython>=0.27.3' oldest-supported-numpy 'setuptools>=43.0.0' wheel Check the logs for full command output.
解决办法:下载pycocotools安装包到本地
执行命令:python setup.py build_ext install