I’ve installed PyTorch from source by following the instructions on the Github repo. Everything works fine, and the installation is a success, although the problem arises when I try to import torch. This the following import error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kevinlu/miniconda3/envs/fastai/lib/python3.6/site-packages/torch/__init__.py", line 53, in <module>
from torch._C import *
ImportError: dlopen(/Users/kevinlu/miniconda3/envs/fastai/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so, 10): Symbol not found: _ompi_mpi_char
Referenced from: /Users/kevinlu/miniconda3/envs/fastai/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/kevinlu/miniconda3/envs/fastai/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.0.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: ! which python
/Users/kevinlu/miniconda3/envs/fastai/bin/python
Tried the fix by changing: main_libraries += ['cudart', 'nvToolsExt', 'nvrtc', 'cuda', 'mpi_cxx']
and now I’m having trouble building it, here is the output in pastebin.