系统环境:Mac Pro
程序环境:python 3.7
from torch._C import *
Traceback (most recent call last):
File "/Users/haibei/Documents/Airly/new-pollution-forecast/Datasets/__init__.py", line 3, in <module>
from torch.utils.data import Dataset
File "/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/__init__.py", line 79, in <module>
from torch._C import *
ImportError: dlopen(/Users/haibei/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/lib/libshm.dylib
Reason: image not found
brew install libomp