Почему Seaborn не устанавливается на PyCharm или в командной строке?
1632
CJF
Когда я пытаюсь установить Seaborn в PyCharm, добавив пакет в мои доступные пакеты, я получаю сообщение об ошибке
Ненулевой код выхода (1)
Это обеспечивает предлагаемое решение, которое состоит в следующем:
Попробуйте запустить эту команду ( pip install seaborn) из системного терминала. Убедитесь, что вы используете правильную версию pip, установленную для вашего интерпретатора Python, расположенную в /usr/bin/python2.7.
Когда я запускаю команду в терминале, я получаю следующую ошибку:
Сбой команды "python setup.py egg_info" с кодом ошибки 1 в / tmp / pip-build-edImGe / matplotlib
Полный терминал выглядит так:
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
В верхней части этого журнала написано следующее:
Вы используете версию 7.1.0 pip, однако доступна версия 9.0.1. Вы должны рассмотреть возможность обновления с помощью команды 'pip install --upgrade pip'.
Поэтому я попытался обновить pip с помощью следующей команды: pip install --upgrade pipкоторая вызвала больше ошибок, а именно:
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'
что я делаю не так и что я должен сделать, чтобы установить Seaborn?
Можете ли вы успешно удалить PIP 7.1 (просто удалите его, а не обновляйте)?
Ƭᴇcʜιᴇ007 7 лет назад
0
Вы знаете команду сделать это случайно? Я не могу найти его в Интернете. - Неважно, я сделал это с помощью `pip uninstall pip` и нет, это не работает.
CJF 7 лет назад
0
Теперь он работает после использования `sudo` перед командой` pip uninstall pip`
CJF 7 лет назад
1
Вы должны добавить это как правильный ответ.
Ƭᴇcʜιᴇ007 7 лет назад
0
1 ответ на вопрос
2
CJF
Проблема здесь в том, что нужно обновить версию 'pip', но обычная команда pip install --upgrade pipне будет работать. Это может быть решено удалением pip с помощью sudo pip uninstall pip.
Как только это будет сделано, переустановите «pip», используя: