2017-07-16 7 views
0

Ich kann Pyplot nicht importieren. Wie kann der Fehler behoben werden?
BesteKann Matplotlib pyplot nicht importieren

>>> from matplotlib import pyplot 
Jul 16 12:49:46 Python[35767] <Error>: Set a breakpoint at CGSLogError to catch errors as they are logged. 
Jul 16 12:49:46 Python[35767] <Error>: On-demand launch of the Window Server is allowed for root user only. 
Jul 16 12:49:46 Python[35767] <Warning>: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (268435459) 
Jul 16 12:49:46 Python[35767] <Error>: On-demand launch of the Window Server is allowed for root user only. 
Jul 16 12:49:46 Python[35767] <Warning>: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (268435459) 
Jul 16 12:49:46 Python[35767] <Error>: This user is not allowed access to the window system right now. 
_RegisterApplication(), unable to get application ASN from launchservicesd, and this application requires an ASN, so aborting. error=#-1. 
Abort trap: 6 

Antwort

0

Um die Bibliothek zu nutzen, müssen sie zuerst installiert werden. Es ist möglich, es von official site zu installieren.

In Ubuntu es möglich, sie über apt-get zu bekommen:

sudo apt-get install python-matplotlib 

In Fenstern, für Standard-Python-Installationen installieren matplotlib pip mit:

python -m pip install -U pip setuptools 
python -m pip install matplotlib 
Verwandte Themen