Skip to content

"Symbol not found" when "import torch" on Mac OS #691

@WarBean

Description

@WarBean

I have installed pytorch from source on Mac OS successfully, but import torch cases error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/warbean/anaconda3/envs/py35/lib/python3.5/site-packages/torch/__init__.py", line 45, in <module>
    from torch._C import *
ImportError: dlopen(/Users/warbean/anaconda3/envs/py35/lib/python3.5/site-packages/torch/_C.cpython-35m-darwin.so, 10): Symbol not found: ___emutls_get_address
  Referenced from: /Users/warbean/anaconda3/envs/py35/lib/python3.5/site-packages/torch/lib/libTH.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/warbean/anaconda3/envs/py35/lib/python3.5/site-packages/torch/lib/libTH.1.dylib

Looks like the key is Symbol not found: ___emutls_get_address. Any suggestions to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions