I'm having difficulties installing matplotlib through pip on my M1 Mac. I have Python 3.9.1 installed through Homebrew.
When running pip3 install matplotlib
the installer tries installing the newest version, matplotlib 3.3.4. The installer gets stuck and prints a huge error message after some time. After this it tries installing version 3.3.3 after which the same happens again, and so on. What goes wrong?
Here is some of the error message:
william@Williams-MacBook-Pro ~ % pip3 install matplotlib
Collecting matplotlib
Using cached matplotlib-3.3.4.tar.gz (37.9 MB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/[email protected]/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/pip-install-h7oltt2f/matplotlib_1ad1e28a38b14b40ae2bcaa7f9b01cab/setup.py'"'"'; __file__='"'"'/private/var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/pip-install-h7oltt2f/matplotlib_1ad1e28a38b14b40ae2bcaa7f9b01cab/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/pip-pip-egg-info-0jjax4jc
cwd: /private/var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/pip-install-h7oltt2f/matplotlib_1ad1e28a38b14b40ae2bcaa7f9b01cab/
Complete output (2287 lines):
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/[email protected]/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/tmp3p0is_vc
cwd: /private/var/folders/yb/rgjfc7ws25ddwd07x96f4fmw0000gn/T/pip-wheel-5rqmhbah/numpy_cefeff1e3acc4faea4c06d0f4597b2da