0
好了,我想使用matplotlib:固定NumPy的失敗導入多陣列
import matplotlib.pyplot as plt
import matplotlib.rcsetup as rc
print(rc.all_backends)
plt.plot([1,2,3], [4,5,6])
plt.show()
,但我得到的第一行一個錯誤,當我嘗試導入matplotlib:
Traceback (most recent call last):
File "C:\Users\Vineet\Documents\Summer 2017\Python\MathPlot\MathPlot\Intro.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Program Files\Python36\lib\site-packages\matplotlib\__init__.py", line 122, in <module>
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "C:\Program Files\Python36\lib\site-packages\matplotlib\cbook.py", line 32, in <module>
import numpy as np
File "C:\Program Files\Python36\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Program Files\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Program Files\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Program Files\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.
本質上,主要問題是在numpy的圖書館,當它試圖導入的多陣列模塊:
File "C:\Program Files\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.
我檢查了我的文件並沒有多元陣列的跡象。我該如何解決?我試着重新安裝numpy(1.13.1),但那不起作用。我通過互聯網瀏覽,但找不到適合我的解決方案。
OS:窗口10 的Python:3.6 numpy的:1.13.1
它在py2.7.10 ubuntu,numpy 1.8.2上爲我工作! –
我有一些類似的問題...爲我工作的東西:安裝較低版本('pip安裝numpy = 1.11.1')。並重新安裝它後,像5次,每次改變它的小工具(用最新版本),但我不能告訴你爲什麼^^ –
@JürgMerlinSpaak我試過了,但它不會讓我:「不能找到滿足要求的版本1.11.1(來自版本:) 沒有找到匹配的分配1.11.1「 –