在使用pip install onnx
时遇到如下错误:
Building wheels for collected packages: onnx
Building wheel for onnx (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/users/yuxuan.wei/env/env1/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-t2jk_rl6/onnx_460e3fe0fd4241829e6bd153039e173b/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-t2jk_rl6/onnx_460e3fe0fd4241829e6bd153039e173b/setup.py’“'”‘;f = getattr(tokenize, ‘"’“‘open’”’“‘, open)(file) if os.path.exists(file) else io.StringIO(’”‘“‘from setuptools import setup; setup()’”’“‘);code = f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ bdist_wheel -d /tmp/pip-wheel-foccssk2
一堆提示,提炼定位到ERROR: Command errored out with exit status 1:
,安装包的版本和Python版本不匹配的报错,如何解决呢?
使用命令查看Python版本:
python -V
到Python装包网站上去搜对应包的版本即可,例子如下:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)