python 3.8.0 doesn’t allow me to install matplotlib orz

BigSur Version 11.1 Beta
python
$ pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.3.3.tar.gz (37.9 MB)
ERROR: Command errored out with exit status 1:
command: /Users/koji/.pyenv/versions/3.8.0/bin/python3.8 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘“‘“‘/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setup.py’”’”’; __file__=’”’”’/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/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/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu
cwd: /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/
Complete output (62 lines):
Edit setup.cfg to change the build options; suppress output with — quiet.BUILDING MATPLOTLIB
matplotlib: yes [3.3.3]
python: yes [3.8.0 (default, Sep 3 2020, 23:19:59) [Clang 12.0.0
(clang-1200.0.31.1)]]
platform: yes [darwin]
sample_data: yes [installing]
tests: no [skipping due to configuration]
macosx: yes [installing]
running egg_info
creating /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info
writing /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/dependency_links.txt
writing namespace_packages to /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/namespace_packages.txt
writing requirements to /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/requires.txt
writing top-level names to /private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/top_level.txt
writing manifest file ‘/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-pip-egg-info-kbc9eqzu/matplotlib.egg-info/SOURCES.txt’
init_dgelsd failed init
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setup.py”, line 242, in <module>
setup( # Finally, pass this all along to distutils to do the heavy lifting.
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/setuptools/__init__.py”, line 153, in setup
return distutils.core.setup(**attrs)
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/dist.py”, line 966, in run_commands
self.run_command(cmd)
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/dist.py”, line 985, in run_command
cmd_obj.run()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/setuptools/command/egg_info.py”, line 298, in run
self.find_sources()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/setuptools/command/egg_info.py”, line 305, in find_sources
mm.run()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/setuptools/command/egg_info.py”, line 536, in run
self.add_defaults()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/setuptools/command/egg_info.py”, line 572, in add_defaults
sdist.add_defaults(self)
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/command/sdist.py”, line 228, in add_defaults
self._add_defaults_ext()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/command/sdist.py”, line 311, in _add_defaults_ext
build_ext = self.get_finalized_command(‘build_ext’)
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/cmd.py”, line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/distutils/cmd.py”, line 107, in ensure_finalized
self.finalize_options()
File “/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setup.py”, line 88, in finalize_options
self.distribution.ext_modules[:] = [
File “/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setup.py”, line 91, in <listcomp>
for ext in package.get_extensions()
File “/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setupext.py”, line 345, in get_extensions
add_numpy_flags(ext)
File “/private/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/pip-install-dwdwanvq/matplotlib/setupext.py”, line 469, in add_numpy_flags
import numpy as np
File “/Users/koji/.pyenv/versions/3.8.0/lib/python3.8/site-packages/numpy/__init__.py”, line 286, in <module>
raise RuntimeError(msg)
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
— — — — — — — — — — — — — — — — — — — —
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

matplotlib has released the suitable version for python 3.8.0 already.
(python 3.9 not yet)

Solution

$ python -m pip install --upgrade pip
$ pip install matplotlib
$ pip list | grep matplotlib
matplotlib 3.3.3

https://pypi.org/project/matplotlib/

#CreativeCoding #Art #PhysicalComputing #IoT #MachineLearning #python #creativetech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store