python #macos #matplotlib #pip
#python #macos #matplotlib #pip
Вопрос:
Я пытаюсь установить matplotlib с помощью pip на mac M1 с macOS 11.4, но получаю следующую ошибку:
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting matplotlib
Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: cycler>=0.10 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (1.3.2)
Requirement already satisfied: numpy>=1.16 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (1.21.2)
Requirement already satisfied: pillow>=6.2.0 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (8.3.2)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six in /opt/homebrew/lib/python3.9/site-packages (from cycler>=0.10->matplotlib) (1.16.0)
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py): started
Building wheel for matplotlib (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/setup.py'"'"'; __file__='"'"'/private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-wheel-ipsv3z0z
cwd: /private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/
Complete output (639 lines):
(из-за ограничений по длине здесь полный вывод можно найти по адресу https://pastebin.com/MyGhbE5q )
Есть идеи, как исправить?
Это происходит, если я запускаю
pip install matplotlib
или
pip3 install matplotlib
Комментарии:
1. вы читали обсуждение на github.com/Homebrew/homebrew-core/issues/76621 ?
2. @It_is_Chris Да, в нем говорится: «Если вы были направлены сюда из предупреждения pip, вам не нужно предпринимать никаких действий на этом этапе. В настоящее время ожидается, что ничего не сломается до Python 3.12, и полное решение будет реализовано задолго до этого «. Я следую этому совету и ничего не делал.
3. Можете ли вы опубликовать config.log?
4. @idonthaveaname Где я могу это найти? Его нет ни в моем текущем рабочем каталоге, ни в моей домашней папке, ни в ~/.config . И временная папка, упомянутая в сообщениях об ошибках, похоже, не существует.
5. Я рекомендую использовать дистрибутив Anaconda , он, вероятно, значительно облегчит вашу жизнь. Список пакетов