python2.7 - python导入scimath失败提示:cannot import name scimath
高洛峰
高洛峰 2017-04-17 17:07:52
0
1
876

运行:

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

求帮助。

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
洪涛

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template