ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Note: When installing in a non-Anaconda environment, make sure to install the Protobuf compiler before running the pip installation of onnx. For example, on Ubuntu:

注意:在非Anaconda环境中安装时,请确保在运行onnx的pip安装之前先安装Protobuf编译器。例如,在Ubuntu上:

sudo apt-get install protobuf-compiler libprotoc-dev
pip install onnx

安装后,运行

python -c "import onnx"

验证它是否有效。请注意,该命令不适用于源检出目录。在这种情况下,您会看到:

ModuleNotFoundError: No module named 'onnx.onnx_cpp2py_export'

 切换到其它目录运行即可解决此问题。

你可能感兴趣的:(ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly)