numpy インポートエラー - ImportError: mtrand というモジュールがありません。

numpy インポートエラー - ImportError: mtrand というモジュールがありません。

ソースからコンパイルnumpy-1.11.2し、次のようにインストールしました。 python setup.py install

Pythonからインポートしようとすると、次のエラーが発生します。

python
Python 2.7.10 (default, Mar 14 2016, 14:17:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/numpy-1.11.2-py2.7-linux-x86_64.egg/numpy/__init__.py", line 163, in <module>
    from . import random
  File "/usr/local/lib/python2.7/site-packages/numpy-1.11.2-py2.7-linux-x86_64.egg/numpy/random/__init__.py", line 99, in <module>
    from mtrand import *
ImportError: No module named mtrand

ここに問題がありますか?

ベストアンサー1

Pythonがnumpyインストールを見つけることができませんapt-get install python-numpyを試してみることはできますか?

おすすめ記事