Die Installation von Matplotlib in Windows 10 64-bit
Könnte mir jemand sagen, welche Dateien ich herunterladen soll und die Aussagen, die ich ausführen muss, kann in der Befehlszeile zum installieren von Matplotlib?
Habe ich Python 2.7.13 auf Windows 10 64 bit.
Dies sind die Dateien, die ich entpackt:
Alle heruntergeladen von: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Befehle, die ich ausgeführt:
python -m pip install -U pip setuptools
python -m pip install matplotlib
python -m pip install -U pip
Bin ich immer diese zwei Fehler bei der überprüfung, ob Numpy und Matplotlib installiert sind.
>>> import numpy
**Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import numpy
File "numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "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: %1 no es una aplicación Win32 válida.**
>>> import matplotlib
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import matplotlib
File "matplotlib\__init__.py", line 122, in <module>
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "matplotlib\cbook.py", line 33, in <module>
import numpy as np
File "numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "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: %1 no es una aplicación Win32 válida.
- die Fehlermeldung scheint nicht zu kommen aus
matplotlib
sondern die Fehlermeldung schlägt vor, dass "Most likely you are trying to import a failed build of numpy.
". Haben Sie installiertnumpy
? - Die Strategie, die Sie beschreiben, hat nie für mich gearbeitet. Deshalb ist es toll, die vorkompilierte Pakete zur Verfügung, die auf Ihrer Website zum manuellen download; ich benutze Sie für jede Bibliothek-update verfügbar.
- Dies ist vielleicht nicht der beste Ort, dies zu diskutieren, aber um ein Beispiel zu geben: heute morgen habe ich aktualisiert matplotlib ab version 2.0.0 bis 2.0.2. Diese version benötigt eine neuere version von numpy als ich vorher hatte. Also während der matplotlib installieren mit pip-er sammelte numpy 1.12 und installiert es. Danach war nichts mehr zu arbeiten. Was ich brauchte, um zu tun ist, laden Sie den jeweiligen Rädern von Ihrer Seite aus, installieren Sie numpy Rad und dann matplotlib Rad und nun funktioniert alles wunderbar. Also aus irgendeinem Grund pip nicht sammeln die richtige numpy-version, so ist es gut, die Räder zur Verfügung.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Dies ist ein häufiges Problem für windows-Benutzer. Und Sie werden wahrscheinlich brauchen vorkompilierte Pakete für andere Bibliotheken, wie z.B. scipy.
Finden Sie auf SourceForge die numpy Super Pack, dessen name Struktur ist numpy-X.X.X-win32-superpack-python2.7.exe, z.B. numpy-1.9.2-win32-Super Pack von Python-GNOME2.7.
Auf Pypi (Python Package Index), finden Sie die matplotlib Bibliothek, deren name Struktur ist matplotlib-X.X.X.win32-py2.7.exe, e.g matplotlib-1.4.3.win32-py2.7.exe.
Installation von matplotlib durch pip automatisch den Download der Dateien von der python-index, wie Sie versuchen zu tun, hier werden die meisten wahrscheinlich nicht für windows.
Gibt es im wesentlichen zwei Optionen:
Installieren Sie eine komplette distribution wie Anaconda, Überdachung, WinPython, etc. die hat schon alle der jeweiligen Bibliotheken enthalten.
Verwenden vorkompilierte Räder. Eine Quelle für diese ist in der Tat diese Website von Christoph Gohlke. Sie müssten dann sicherstellen, dass zu installieren, alle Abhängigkeiten zuerst und matplotlib letzten. Beginnend mit numpy ist die beste, dann andere Abhängigkeiten, matplotlib letzten. Um diese installieren, verwenden Sie
z.B.