我正在尝试使用ONNX在Ubuntu 16.04上的ONNX模型上运行推断。但是import语句给出了这个错误:
>>> import onnxruntime
/opt/conda/lib/python3.6/site-packages/onnxruntime/capi/_pybind_state.py:13: UserWarning: Cannot load onnxruntime.capi. Error: '/opt/conda/lib/python3.6/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-36m-x86_64-linux-gnu.so: cannot enable executable stack as shared object requires: Permission denied'
warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e)))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/lib/python3.6/site-packages/onnxruntime/__init__.py", line 12, in <module>
from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, set_seed, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode, OrtDevice, SessionIOBinding
ImportError: cannot import name 'get_all_providers'在网上搜索后,我尝试在警告中提到的.so上使用execstack -c。但我得到了这样的信息,问题仍然存在:
section file offsets not monotonically increasing我真的很感激一些指点来解决这个问题。
附注:我甚至尝试安装了一个运行时gpu(我有CUDA 10.0),但我得到了同样的错误。
发布于 2020-07-17 15:09:30
https://stackoverflow.com/questions/62607359
复制相似问题