2017-07-05 3 views
0

Ich habe Python 3.6 und durch Pip hinzugefügt numpy-Modul installiert, aber unten Fehler beim Versuch, die Bibliothek zu importieren. Mit freundlicher hier helfen:Nicht möglich, numpy Bibliothek in Python zu importieren

>>> import numpy 
Traceback (most recent call last): 
    File "C:\Users\as338011\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. 

Während der oben genannten Ausnahmebehandlung, eine weitere Ausnahme aufgetreten:

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Users\as338011\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\__init__.py", line 142, in <mod 
ule> 
    from . import add_newdocs 
    File "C:\Users\as338011\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in <m 
odule> 
    from numpy.lib import add_newdoc 
    File "C:\Users\as338011\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in <m 
odule> 
    from .type_check import * 
    File "C:\Users\as338011\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\as338011\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-Fehler: DLL Last fehlgeschlagen: Die angegebene Prozedur konnte nicht gefunden werden.

+1

Haben Sie versucht, numpy zu deinstallieren und dann neu zu installieren? – DavidG

+0

Ich versuchte mehrmals über pip neu zu installieren, während ich mit pip3 versuche, bekomme ich folgende Fehlermeldung: 'PS E: \ Maschine schief Klassifikator> python pip3 installieren numpy C: \ Benutzer \ as338011 \ AppData \ Lokale \ Programme \ Python \ Python36 \ python.exe: Datei 'pip3' kann nicht geöffnet werden: [Errno 2] Keine Datei oder Verzeichnis ' – Ashutosh

Antwort

0

Wie Ihr Terminal vermuten lässt, haben Sie möglicherweise die falsche Version von numpy installiert. Wenn Sie Python 3 verwenden, sollten Sie pip3 install numpy anstelle von normalem (python 2.7) pip verwenden. In beiden Fällen sollten Sie versuchen, numpy neu zu installieren, oder wenn das immer noch nicht funktioniert, können Sie es aus der Quelle erstellen. Dies basiert auf der Tatsache, dass das Problem scheint mit dem numpy-Paket und nicht Ihr System selbst zu sein.

+0

Hallo Cary, Ich habe versucht, mehrmals über Pip zu installieren, während ich mit pip3 versuche, bekomme ich folgenden Fehler: PS E: \ Machine lehnender Klassifikator> python pip3 install numpy C: \ Benutzer \ as338011 \ AppData \ Lokale \ Programme \ Python \ Python36 \ python.exe: Datei 'pip3' kann nicht geöffnet werden: [Errno 2] Keine solche Datei oder Verzeichnis – Ashutosh

+0

Sieht aus, als ob Sie pip3 vermissen. Sie müssen das zuerst installieren. –

Verwandte Themen