尝试在macOS上使用python 3.6.3在Jupiter笔记本中导入on。我在导入时得到以下错误:
import onnxruntime
ImportError
Traceback (most recent call last)
<ipython-input-4-df664b79ebd4> in <module>
----> 1 import onnxruntime
2
~/.virtualenvs/3.6nlp/lib/python3.6/site-packages/onnxruntime/__init__.py in <module>
11 __author__ = "Microsoft"
12
---> 13 from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, set_seed, \
14 RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, \
15 ExecutionMode, OrtDevice, SessionIOBinding
ImportError: cannot import name 'get_all_providers'我看过类似的问题,比如this,但还没有找到适合我的答案。
有什么建议吗?谢谢!!
发布于 2020-10-17 01:55:33
原来问题出在没有安装libomp上。如果遇到这个问题,可以通过运行以下命令来解决
brew install libomp如果你像我一样被卡住了,希望这对你有帮助
https://stackoverflow.com/questions/64270311
复制相似问题