Skip to content

Missing numpy dependency at installation #2188

@minhlab

Description

@minhlab

I installed PyTorch on a fresh Python 3.6 installation (brew install python3), got an error and found out that numpy wasn't installed. I installed numpy and then things work. Shouldn't it be included among dependencies of the PyTorch package?

Minhs-MacBook-Pro:~ cumeo$ pip3 install --user http://download.pytorch.org/whl/torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl
Collecting torch==0.1.12.post2 from http://download.pytorch.org/whl/torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl
  Downloading http://download.pytorch.org/whl/torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 1.6MB/s
Collecting pyyaml (from torch==0.1.12.post2)
Installing collected packages: pyyaml, torch
Successfully installed pyyaml-3.12 torch-0.1.12.post2
Minhs-MacBook-Pro:~ cumeo$ python3
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cumeo/Library/Python/3.6/lib/python/site-packages/torch/__init__.py", line 53, in <module>
    from torch._C import *
ImportError: numpy.core.multiarray failed to import
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
>>>
Minhs-MacBook-Pro:~ cumeo$ pip3 install --user numpy
Collecting numpy
  Using cached numpy-1.13.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.13.1
Minhs-MacBook-Pro:~ cumeo$ python3
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>>

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