运行:
from numpy import *
显示:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 170, in <module>
from . import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 17, in <module>
from . import scimath as emath
ImportError: cannot import name scimath
求帮助。
PHP中文网2017-04-17 17:09:52
The error lies here, from .
is a relative path, obviously your python is not set up properly.
from . import scimath as emath
The easiest way is to install anaconda distribution version of python, don't bother yourself anymore, the numerical calculation packages are very troublesome to install, there are a lot of minor problems, and windows is probably even more troublesome.
PS: Learn how to search, http://stackoverflow.com/questions/26238004/ipython-notebook-throws-importerror-ipython-doesnt. The first three search results for the keyword "cannot import name scimath" are all Related solutions, why can’t I find