Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for python3.9 on macOS (non Homebrew version) #18711

Closed
mayankmetha opened this issue Oct 11, 2020 · 10 comments
Closed

Support for python3.9 on macOS (non Homebrew version) #18711

mayankmetha opened this issue Oct 11, 2020 · 10 comments

Comments

@mayankmetha
Copy link

Collecting matplotlib
Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setup.py'"'"'; file='"'"'/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/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/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr
cwd: /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/
Complete output (63 lines):
WARNING: The wheel package is not available.

Edit setup.cfg to change the build options; suppress output with --quiet.

BUILDING MATPLOTLIB
  matplotlib: yes [3.3.2]
      python: yes [3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23)  [Clang 6.0
                  (clang-600.0.57)]]
    platform: yes [darwin]
 sample_data: yes [installing]
       tests: no  [skipping due to configuration]
      macosx: yes [installing]

running egg_info
creating /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info
writing /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/dependency_links.txt
writing namespace_packages to /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/namespace_packages.txt
writing requirements to /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/requires.txt
writing top-level names to /private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/top_level.txt
writing manifest file '/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-pip-egg-info-aq680rqr/matplotlib.egg-info/SOURCES.txt'
init_dgelsd failed init
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setup.py", line 242, in <module>
    setup(  # Finally, pass this all along to distutils to do the heavy lifting.
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 297, in run
    self.find_sources()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 304, in find_sources
    mm.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 535, in run
    self.add_defaults()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 571, in add_defaults
    sdist.add_defaults(self)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/sdist.py", line 228, in add_defaults
    self._add_defaults_ext()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/sdist.py", line 311, in _add_defaults_ext
    build_ext = self.get_finalized_command('build_ext')
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 299, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 107, in ensure_finalized
    self.finalize_options()
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setup.py", line 88, in finalize_options
    self.distribution.ext_modules[:] = [
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setup.py", line 91, in <listcomp>
    for ext in package.get_extensions()
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setupext.py", line 345, in get_extensions
    add_numpy_flags(ext)
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/setupext.py", line 469, in add_numpy_flags
    import numpy as np
  File "/private/var/folders/_b/73g4h5qs7qv51ctyl5tby0040000gn/T/pip-install-p_zq0z2f/matplotlib/.eggs/numpy-1.19.2-py3.9-macosx-10.9-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.

@jklymak
Copy link
Member

jklymak commented Oct 11, 2020

It seems your numpy is not compatible with 3.9 either? Can you import numpy?

@mayankmetha
Copy link
Author

mayankmetha commented Oct 12, 2020

Yes I'm able to download numpy 1.18 and 1.19, but it builds from source. BTW numpy works well for me on python 3.9.

@jklymak
Copy link
Member

jklymak commented Oct 12, 2020

That error is coming up when you import numpy, so its confusing that the install fails but you are able to use numpy.

@mayankmetha
Copy link
Author

Same here, this is weird error issue actually.

@dopplershift
Copy link
Contributor

What command are you running to install matplotlib (e.g. pip install matplotlib)? How are you testing that you can import numpy?

@mayankmetha
Copy link
Author

mayankmetha commented Oct 13, 2020

To install matplotlib I used pip install matplotlib. For numpy I installed it using pip and then on my python script ran:
import numpy as np
print(np.arange(10))

@dopplershift
Copy link
Contributor

So I assume you run that script with python myscript.py. Can you try to install matplotlib with python -m pip install matplotlib?

@mayankmetha
Copy link
Author

So I assume you run that script with python myscript.py. Can you try to install matplotlib with python -m pip install matplotlib?

Same error!

@jklymak
Copy link
Member

jklymak commented Oct 13, 2020

Using conda, I can install py3.9 and numpy from conda-forge. matplotlib fails from conda with an unreasonable dependency, but pip install matplotlib works fine.

@mayankmetha Perhaps more info about how you installed python would help, but its still not clear how numpy is working fine during your tests, but failing on matplotlib's install. I would uninstall numpy and matplotlib, and then re-install.

@dopplershift
Copy link
Contributor

This looks identical to numpy/numpy#17550. Most importantly:

There are not yet binary wheels for Python 3.9, consequently the source is built and linked to your local Mac Accelerate library which is known to be buggy.

So I don't think there's anything for us to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants