在使用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