onnx error:
import onnx
Traceback (most recent call last):
File "torch2onnx.py", line 3, in
import onnx
File "/home/dy/anaconda3/envs/torch/lib/python3.6/site-packages/onnx/__init__.py", line 5, in
from .onnx_cpp2py_export import ONNX_ML
ImportError: /home/dy/anaconda3/envs/torch/lib/python3.6/site-packages/onnx/onnx_cpp2py_export.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6google8protobuf7Message17CopyWithSizeCheckEPS1_RKS1_
Solution:
git clone https://github.com/onnx/onnx.git
cd onnx
git submodule update –init –recursive
# Optional: prefer lite proto
export CMAKE_ARGS=”-DONNX_USE_PROTOBUF_SHARED_LIBS=ON”
export CMAKE_ARGS=-DONNX_USE_LITE_PROTO=ON
pip install -e .
Read More:
- Python Error: ImportError: cannot import name ‘logsumexp’ from ‘scipy.misc’(Anaconda3\lib\site-packages\scipy\misc)
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- Chromdriver Install error: File “C:\python37\lib\site-packages\selenium\webdriver\common\service.py”, line 76, in start stdin=PIPE) File…
- Mxnet Export onnx Symbol and params files provided are invalid
- Mac Upgrade pip Error OSError: [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/pip-9.0.1-py2….
- FileNotFoundError: Could not find module ‘D:\Anaconda3\envs\labe\Library\bin\geos_c.dll‘ [Solved]
- [Solved] supervisor Error: /usr/local/lib/python2.7/dist-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
- [Solved] Pycharm Use pip Error: Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present
- [Solved] Error: unrecognized arguments: — no site packages
- How to Solve Python Importerror: DLL load failed: unable to find the specified program using tensorflow
- [zipfile] Python packages files as zip packages & decompresses them
- [Solved] mmdetection Error: ImportError: /home/user/repos/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x
- Pychar can’t connect to Python console, but it can run. Py file, and Anaconda’s command line can run Python command
- How to Solve Python ImportError: cannot import name UnrewindableBodyError
- Importerror: DLL load failed: unable to find the specified module in Python
- Python: Torch.nn.functional.normalize() Function
- An introduction to sys modules in Python and how packages are imported and used
- [Solved] torchsummary Error: RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.F
- Install PyTorch in Anaconda environment
- [Solved] Failed to obtain/convert traceback after Python Tkinter packages exe