使用numpy

时间:2017-06-20 08:10:21

标签: python numpy

我正在尝试使用pandas python进行excel操作。

每当我尝试使用pandas库时,它会给我一些错误,说numpy没有安装。

现在,当我尝试 pip install numpy pip安装pandas 时,它说要求已经满足

但是当我尝试做一个简单的numpy教程时,它会在numpy的import语句中出错。

> import numpy as np
>Traceback (most recent call last):
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
>    from . import multiarray
>ImportError: DLL load failed: The specified procedure could not be found.
>
>During handling of the above exception, another exception occurred:
>
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\__init__.py", line 142, in <module>
>    from . import add_newdocs
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
>    from numpy.lib import add_newdoc
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
>    from .type_check import *
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
>    import numpy.core.numeric as _nx
>  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
>    raise ImportError(msg)
>ImportError:
>Importing the multiarray numpy extension module failed.  Most
>likely you are trying to import a failed build of numpy.
>If you're working with a numpy git repo, try `git clean -xdf` (removes all
>files not under version control).  Otherwise reinstall numpy.
>
>Original error was: ***DLL load failed: The specified procedure could not be found.***

1 个答案:

答案 0 :(得分:0)

尝试pip install --upgrade --force-reinstall numpy 你应该在正确的目录中尝试。