0

My build and version of Big Sur is undetermined. I’m using homebrew which says submit a pull request rather tan ask them for support on prerelease macOS.

I get this:

> pip3 install matplotlib
Collecting matplotlib
  Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python@3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-install-zly4xiti/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-install-zly4xiti/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/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-pip-egg-info-mafx0kq9
         cwd: /private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-install-zly4xiti/matplotlib/
    Complete output (62 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.

BUILDING MATPLOTLIB
  matplotlib: yes [3.3.2]
      python: yes [3.9.0 (default, Oct  6 2020, 04:17:54)  [Clang 12.0.0
                  (clang-1200.0.32.2)]]
    platform: yes [darwin]
 sample_data: yes [installing]
       tests: no  [skipping due to configuration]
      macosx: yes [installing]

running egg_info
creating /private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-pip-egg-info-mafx0kq9/matplotlib.egg-info
writing /private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-pip-egg-info-mafx0kq9/matplotlib.egg-info/PKG-INFO

....

  File "/private/var/folders/1y/2wcx2c056m9d591zqdyv50mw0000gn/T/pip-install-zly4xiti/matplotlib/.eggs/numpy-1.19.2-py3.9-macosx-10.15-x86_64.egg/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.

I guess the Accelerate backend doesn't work on bigsur, but then how can I install it with another backend?

bmike
  • 235,889
Thomas
  • 349
  • How did you install python and pip3? – mmmmmm Oct 10 '20 at 16:40
  • I used brew for both – Thomas Oct 10 '20 at 16:40
  • Then you ask brew support how to install. Does Homebrew support macOS XI beta? – mmmmmm Oct 10 '20 at 16:43
  • most packages work, a few don't, it's more like a work in progress at this stage; what's weird is that I could run the matplotlib I had before the bigsur update and since I removed it, it will not install. I can understand that there is an issue with the backend, but my question is how can I install it with another back-end. Or is there a way to install a pre-built binary to see if it runs on this OS? – Thomas Oct 10 '20 at 16:45
  • It is a beta - things might just not work. Ask on beta mailing lists. Many beta users are bound by non disclosure rules and can't answer in non apple places. – mmmmmm Oct 10 '20 at 17:07
  • I can see it's a widespread problem: the Accelerate backend doesn't work on BigSur, and all packages using it will fail; people are reporting problems with numpy, I have seen matplot lib and plotly-express both fail because of that reason as well. Apparently the word around is to not use Accelerate and use OpenBlas, but since I install with Brew and have no idea how to build these packages otherwise, I'm stuck – Thomas Oct 10 '20 at 17:13
  • What’s the lowest version of mathplotlib you need? Until brew gets the pull requests and tests them, you might have better luck using the recommended installer at https://docs.anaconda.com/anaconda/install/mac-os/ – bmike Oct 10 '20 at 18:05
  • I use only very basic functionalities, so an older version would do; I have never used anaconda before; does it install binaries? or does it do a local build? – Thomas Oct 10 '20 at 18:48
  • 1
    @bmike, I tried anaconda and it worked like a charm! thanks for the idea! – Thomas Oct 10 '20 at 19:26

1 Answers1

0

This issue is not related to Big Sur pre-release version but rather broken matplotlib after Python 3.9 update, the problem exists on Catalina (10.15.7), too:

https://github.com/matplotlib/matplotlib/issues/18678

Most likely missing wheels support in NumPy is causing the issue:

https://github.com/numpy/numpy/issues/17482

Installing older Python version should fix the problem until the problem is fixed on NumPy side. (The current 3.8.x version is 3.8.6).

To install specific Python version please see:

How to install specific version of python on OS X

Palec
  • 176
  • so the Accelerate issue is also happening on Catalina? – Thomas Oct 10 '20 at 22:56
  • @Thomas Not just Catalina, Python 3.9 pip fails to install matplotlib also under Mojave (10.14). It may take few days until the missing packages are updated. However, this seems to have nothing to do with homebrew package manager. – Palec Oct 11 '20 at 02:53
  • with homebrew, it definitely won't build because of the Accelerate issue; but with Anaconda, it installs properly the pre-built packages – Thomas Oct 11 '20 at 10:58
  • That's because Anaconda installer bundles Python 3.8 at this moment. – Palec Oct 11 '20 at 17:59