Skip to content

Installing pytorch via pip wheel crashes on import (no module named numpy) #1755

@y0ast

Description

@y0ast

I think the pip wheels are built with numpy support, however numpy is not explicitly listed as a dependency.

When trying to import torch an import error occurs:

>>> import torch
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/private/var/folders/b5/hgpy98310bg_g3hfqngl759m0000gn/T/tmpCRcqEy/.deps/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl/torch/__init__.py", line 53, in <module>
    from torch._C import *
ImportError: numpy.core.multiarray failed to import

Installing numpy and then importing torch does work.

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