I installed pytorch successfully on my Mac (Sierra 10.12.6), using
pip install --user torch==1.0.0. However, when I try to import torch from inside python (2.7.10), I get the following error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/username/Library/Python/2.7/lib/python/site-packages/torch/__init__.py", line 84, in <module> from torch._C import * ImportError: dlopen(/Users/username/Library/Python/2.7/lib/python/site-packages/torch/_C.so, 9): Library not loaded: @rpath/libc++.1.dylib Referenced from: /Users/username/Library/Python/2.7/lib/python/site-packages/torch/_C.so Reason: image not found
I know of at least one other user who has had exactly the same problem, but on the Mojave os, for the same versions of python and torch. Previously, I was able to run torch 0.4.1 without incident, this problem is only post-upgrade. I am able to run torch 1.0.0 with python 3.6.5 (within a virtualenv) fine.