Seite 1 von 1

Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 08:57
von T-Bird92
Hi Leute,

versuche grade matplotlib auf meinem Mac zu installieren.
Allerdings kommt bei der Installation folgender Fehler:

The following required packages can not be built:
* freetype * Try installing freetype with `brew
* install freetype`

Habe dann wie dort geschrieben freetype installiert (Vers. 2.7). Allerdings kommt weiterhin die gleiche Fehlermeldung.

Hiiiiilfeeeeee :-D

Danke im Voraus
T-Bird

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 09:08
von Sirius3
@T-Bird92: wie versuchst Du denn das zu installieren?

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 09:14
von T-Bird92
Matplotlib:

git clone git://github.com/matplotlib/matplotlib.git
cd matplotlib
python3 setup.py install

Freetype:

brew install freetype

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 09:20
von Sirius3
@T-Bird92: der übliche Weg ist:
[codebox=bash file=Unbenannt.sh]
pip install matplotlib
[/code]

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 09:38
von T-Bird92
Last login: Fri Oct 28 09:55:30 on ttys000
MacBook-Pro-Retina:~ Philipp$ pip install matplotlib
Requirement already satisfied (use --upgrade to upgrade): matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.5 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): tornado in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): nose in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from matplotlib)
Requirement already satisfied (use --upgrade to upgrade): singledispatch in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from tornado->matplotlib)
Requirement already satisfied (use --upgrade to upgrade): certifi in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from tornado->matplotlib)
Requirement already satisfied (use --upgrade to upgrade): backports_abc>=0.4 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from tornado->matplotlib)
Requirement already satisfied (use --upgrade to upgrade): six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado->matplotlib)
MacBook-Pro-Retina:~ Philipp$


Passiert nur das hier.

EDIT: Habe es zuvor auch schon mit pip direkt versucht. Da kam das gleiche Ergebnis. PyCharm erkennt Matplotlib einfach nicht. Denke es könnte aber auch daran liegen, dass hier nur für Python 2.7 und nicht für Python 3 (was ich benutze) installiert wird

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 10:40
von Sirius3
@T-Bird92: dann solltest Du halt das pip für Python3 aufrufen:
[codebox=bash file=Unbenannt.bsh]
pip3 install matplotlib
[/code]

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 11:18
von T-Bird92
Habe ich auch schon probiert.

Dann beruft er sich aber trotzdem auf die 2.7 Pythonversion

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 12:06
von Sirius3
@T-Bird92: wer beruft sich auf Python 2?

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 13:49
von T-Bird92
Das Terminal meines Mac.
Es gibt die gleiche Meldung aus wie bei "pip install matplotlib"

PyCharm erkennt matplotlib weiterhin nicht.

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 14:41
von BlackJack
@T-Bird92: Also wenn `pip3` etwas für Python 2.7 installiert, dann stimmt was an Deinem Sytem nicht. Dann ist irgendetwas kaputt konfiguriert. Was passiert bei folgendem:

python3 -m pip install matplotlib

?

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 14:42
von T-Bird92
BlackJack hat geschrieben:@T-Bird92: Also wenn `pip3` etwas für Python 2.7 installiert, dann stimmt was an Deinem Sytem nicht. Dann ist irgendetwas kaputt konfiguriert. Was passiert bei folgendem:

python3 -m pip install matplotlib

?
dann passiert das:

MacBook-Pro-Retina:~ Philipp$ python3 -m pip install matplotlib
Collecting matplotlib
Downloading matplotlib-1.5.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (11.2MB)
100% |████████████████████████████████| 11.2MB 117kB/s
Collecting python-dateutil (from matplotlib)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
100% |████████████████████████████████| 204kB 2.4MB/s
Collecting pyparsing!=2.0.0,!=2.0.4,!=2.1.2,>=1.5.6 (from matplotlib)
Downloading pyparsing-2.1.10-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 4.1MB/s
Collecting cycler (from matplotlib)
Downloading cycler-0.10.0-py2.py3-none-any.whl
Collecting pytz (from matplotlib)
Downloading pytz-2016.7-py2.py3-none-any.whl (480kB)
100% |████████████████████████████████| 481kB 1.9MB/s
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/numpy-1.11.2-py3.5-macosx-10.6-intel.egg (from matplotlib)
Collecting six>=1.5 (from python-dateutil->matplotlib)
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pyparsing, cycler, pytz, matplotlib
Successfully installed cycler-0.10.0 matplotlib-1.5.3 pyparsing-2.1.10 python-dateutil-2.5.3 pytz-2016.7 six-1.10.0

Re: Matplotlib auf MacOS

Verfasst: Freitag 28. Oktober 2016, 14:59
von BlackJack
@T-Bird92: Prima. Dann hast Du jetzt Matplotlib für diese Python 3-Installation installiert. :-)