8000 Import torch causes error · Issue #1228 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
Import torch causes error #1228
@wddabc

Description

@wddabc

This might be relevant to #691. I have installed pytorch from source on Mac OS successfully, but import torch causes error:

ImportError Traceback (most recent call last)
in ()
----> 1 import torch

/Users/dqwang/Study/tools/anaconda2/lib/python2.7/site-packages/torch/ 596F init.pyc in ()
51 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW)
52
---> 53 from torch._C import *
54
55 all += [name for name in dir(_C)

ImportError: dlopen(/Users/dqwang/Study/tools/anaconda2/lib/python2.7/site-packages/torch/_C.so, 10): Symbol not found: __ZNSs4_Rep20_S_empty_rep_storageE
Referenced from: /Users/dqwang/Study/tools/anaconda2/lib/python2.7/site-packages/torch/_C.so
Expected in: flat namespace
in /Users/dqwang/Study/tools/anaconda2/lib/python2.7/site-packages/torch/_C.so

The author of that thread got away with the issue by installing from conda package rather than source, which solved my case as well. But I have to install from the source because of I need CUDA.

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

      0