Warum kann Seaborn nicht auf PyCharm oder in der Befehlszeile installiert werden?

1627
CJF

Wenn ich versuche, Seaborn in PyCharm zu installieren, indem ich das Paket zu meinen verfügbaren Paketen hinzufüge, erhalte ich eine Fehlermeldung

Exit-Code ungleich Null (1)

Es bietet einen Lösungsvorschlag, der wie folgt lautet:

Versuchen Sie, diesen Befehl ( pip install seaborn) vom Systemendgerät aus auszuführen. Stellen Sie sicher, dass Sie die korrekte Version von 'pip' verwenden, die für Ihren Python-Interpreter unter '/usr/bin/python2.7' installiert ist.

Wenn ich den Befehl im Terminal ausführen, erhalte ich die folgende Fehlermeldung:

Befehl "python setup.py egg_info" schlug mit Fehlercode 1 in / tmp / pip-build-edImGe / matplotlib fehl

Das volle Terminal sieht so aus:

calflan@calflan-MacBookPro:~/Projects/CIS3303$ pip install seaborn You are using pip version 7.1.0, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.  Collecting seaborn Downloading seaborn-0.7.1.tar.gz (158kB) 100% |████████████████████████████████| 159kB 2.1MB/s  Collecting scipy (from seaborn) Downloading scipy-0.18.1.tar.gz (13.1MB) 100% |████████████████████████████████| 13.1MB 48kB/s  Collecting matplotlib (from seaborn) Using cached matplotlib-1.5.3.tar.gz Complete output from command python setup.py egg_info: IMPORTANT WARNING: pkg-config is not installed. matplotlib may not be able to find some of its dependencies ============================================================================ Edit setup.cfg to change the build options  BUILDING MATPLOTLIB matplotlib: yes [1.5.3] python: yes [2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609]] platform: yes [linux2]  REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.11.0] dateutil: yes [using dateutil version 2.6.0] pytz: yes [using pytz version 2016.7] cycler: yes [cycler was not found. pip will attempt to install it after matplotlib.] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [pyparsing was not found. It is required for mathtext support. pip/easy_install may attempt to install it after matplotlib.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be found. You may need to install the development package.] png: yes [version 1.2.54] qhull: yes [pkg-config information for 'qhull' could not be found. Using local copy.]  OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite / mock is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite] toolkits_tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite / mock is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite]  OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt5agg: no [PyQt5 not found] qt4agg: yes [installing, Qt: 4.8.7, PyQt: 4.8.7; PySide not found] gtk3agg: no [Requires gtk3 development files to be installed.] gtk3cairo: no [Requires gtk3 development files to be installed.] gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not be found. You may need to install the development package.] tkagg: yes [installing; run-time loading from Python Tcl / Tk] wxagg: no [requires wxPython] gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not be found. You may need to install the development package.] agg: yes [installing] cairo: yes [installing, pycairo version 1.8.8] windowing: no [Microsoft Windows only]  OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: yes [version 9.18] latex: no pdftops: yes [version 0.41.0]  OPTIONAL PACKAGE DATA dlls: no [skipping due to configuration]  ============================================================================ * The following required packages can not be built: * freetype  ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-edImGe/matplotlib 

Oben in diesem Protokoll steht folgendes:

Sie verwenden die Pip-Version 7.1.0, jedoch ist Version 9.0.1 verfügbar. Sie sollten ein Upgrade über den Befehl "pip install --upgrade pip" erwägen.

Also habe ich versucht, pip mit folgendem Befehl zu aktualisieren: pip install --upgrade pipwas zu mehr Fehlern geführt hat, die wie folgt aussehen:

calflan@calflan-MacBookPro:~/Projects/CIS3303$ pip install --upgrade pip  You are using pip version 7.1.0, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 7.1.0 Uninstalling pip-7.1.0: Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run root=options.root_path, File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 640, in install requirement.uninstall(auto_confirm=True) File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 726, in uninstall paths_to_remove.remove(auto_confirm) File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path) File "/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/pip/utils/__init__.py", line 314, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 300, in move rmtree(src) File "/usr/lib/python2.7/shutil.py", line 247, in rmtree rmtree(fullname, ignore_errors, onerror) File "/usr/lib/python2.7/shutil.py", line 252, in rmtree onerror(os.remove, fullname, sys.exc_info()) File "/usr/lib/python2.7/shutil.py", line 250, in rmtree os.remove(fullname) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg/EGG-INFO/requires.txt' 

Was mache ich falsch und was muss ich tun, um Seaborn zu installieren?

0
Können Sie PIP 7.1 erfolgreich entfernen (einfach entfernen, nicht aktualisieren)? Ƭᴇcʜιᴇ007 vor 7 Jahren 0
Kennen Sie den Befehl dazu? Ich kann es online nicht finden. - Egal, ich habe es mit `pip uninstall pip 'gemacht und nein. Es funktioniert nicht. CJF vor 7 Jahren 0
Nachdem "sudo" vor dem Befehl "pip uninstall pip" verwendet wurde, hat es jetzt funktioniert CJF vor 7 Jahren 1
Sie sollten dies als richtige Antwort hinzufügen. Ƭᴇcʜιᴇ007 vor 7 Jahren 0

1 Antwort auf die Frage

2
CJF

Das Problem hier ist, dass die 'pip'-Version aktualisiert werden musste, aber der normale Befehl von pip install --upgrade pipfunktioniert nicht. Dies kann durch die Deinstallation von "pip" mithilfe von erreicht werden sudo pip uninstall pip.

Sobald dies erledigt ist, installieren Sie 'pip' erneut mit:

sudo apt-get install python-setuptools python-dev build essential 

Gefolgt von:

sudo easy_install pip 

Nachdem Sie "pip" erfolgreich neu installiert haben (jetzt in der aktualisierten Form), können Sie "Seaborn" mit folgendem Befehl installieren:

pip install seaborn 

Quelle: http://www.saltycrane.com/blog/2010/02/how-install-pip-ubuntu/

Den letzten Schritt ignorieren, da er nicht benötigt wird (Installation von virtualenv)

Dies erledigt die Arbeit gut. Es sollte eine akzeptierte Antwort sein gloom vor 6 Jahren 0
Oh, leider habe ich nicht bemerkt, dass Sie nur die Frage gestellt haben .. hahah @ CJF gloom vor 6 Jahren 0