spro / practical-pytorch

Go to https://github.com/pytorch/tutorials - this repo is deprecated and no longer maintained
MIT License
4.51k stars 1.1k forks source link

can't import torch #131

Closed Little-Pr1nce closed 3 years ago

Little-Pr1nce commented 5 years ago

macbook pro using " pip install torch torchvison" to install pytorch but when i run the project it shows: ImportError: dlopen(/Users/little-prince/Documents/Graduation_Project/venv/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib Referenced from: /Users/little-prince/Documents/Graduation_Project/venv/lib/python3.6/site-packages/torch/lib/libshm.dylib Reason: image not found

how do i deal with it

jiasureZ commented 5 years ago

Have you solved it? Can you tell me how to do?

jiasureZ commented 5 years ago

brew install libomp solves the problem.