Repository navigation
Closed
Description
Bug report
Bug summary
Pip fails to install matplotlib for Python 3.8b4.
Code for reproduction
pip install matplotlib
OR
python -m pip install -U matplotlib
Actual outcome
ERROR: Command errored out with exit status 1:
command: 'c:\users\florian\pycharmprojects\mcs\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Florian\\AppData\\Local\\Temp\\pip-install-uogjuha9\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Florian\\AppData\\Local\\Temp\\pip-install-uogjuha9\\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 pip-egg-info
cwd: C:\Users\Florian\AppData\Local\Temp\pip-install-uogjuha9\matplotlib\
Complete output (101 lines):
Traceback (most recent call last):
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 248, in run_setup
with DirectorySandbox(setup_dir):
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 399, in __init__
self._exceptions = [
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 400, in <listcomp>
os.path.normcase(os.path.realpath(path))
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 592, in realpath
path = _getfinalpathname_nonstrict(path)
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 566, in _getfinalpathname_nonstrict
path = _readlink_deep(path, seen)
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 536, in _readlink_deep
path = _nt_readlink(path)
OSError: [WinError 1] Fonction incorrecte: 'nul'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Florian\AppData\Local\Temp\pip-install-uogjuha9\matplotlib\setup.py", line 262, in <module>
setup(
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 248, in run_setup
with DirectorySandbox(setup_dir):
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 399, in __init__
self._exceptions = [
File "c:\users\florian\pycharmprojects\mcs\venv\lib\site-packages\setuptools\sandbox.py", line 400, in <listcomp>
os.path.normcase(os.path.realpath(path))
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 592, in realpath
path = _getfinalpathname_nonstrict(path)
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 566, in _getfinalpathname_nonstrict
path = _readlink_deep(path, seen)
File "C:\Users\Florian\AppData\Local\Programs\Python\Python38\lib\ntpath.py", line 536, in _readlink_deep
path = _nt_readlink(path)
OSError: [Errno 22] Fonction incorrecte: 'nul'
================================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0b4 (tags/v3.8.0b4:d93605d, Aug 29 2019, 23:21:28) [MSC
v.1916 64 bit (AMD64)]]
platform: yes [win32]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: no [Mac OS-X only]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Expected outcome
matplotlib was successfully installed
Matplotlib version
- Operating system: Windows 10
- Matplotlib version: Trying to install 3.1.1
- Matplotlib backend: Not applicable
- Python version: 3.8b4
- Jupyter version (if applicable): Not applicable
- Other libraries: None
I'm on a virtualenv if this matters.
Reacted by Celine294, ajanmot and ch-yx
Activity
Celine294 commentedon Sep 18, 2019
I reproduced the bug. However, i've no idea how to fix that. Looks like the error is raised in the
osmodule, outside of the virtual environnment. Maybe that's part of the problem?ImportanceOfBeingErnest commentedon Sep 18, 2019
Maybe worth noting that even if the install did not fail, there is no guarantee for matplotlib 3.1 working on python 3.8. (matplotlib 3.1 was released a month before python 3.8 came into beta, so at that point, no testing was in place)
QuLogic commentedon Sep 18, 2019
There is at least one backport necessary to get 3.1.1 working on Python 3.8.
tacaswell commentedon Sep 18, 2019
I'm pretty sure that this is a bug in Python's path handling on windows that looks like it has been fixed for the next beta (https://bugs.python.org/issue38081).
tacaswell commentedon Sep 18, 2019
See https://dev.azure.com/matplotlib/matplotlib/_build/results?buildId=6237&view=logs&jobId=3bfd59c0-bc68-5456-57ca-1c3175235622&taskId=dc6409be-5861-57e9-ff36-e221bb7464b0&lineStart=128&lineEnd=129&colStart=1&colEnd=1 for error in a pandas install on CI.
DahlitzFlorian commentedon Oct 29, 2019
FYI: I'm running Python 3.8.0 on Debian 9.11 stretch and get a similar error when installing the latest version of matplotlib.
tacaswell commentedon Oct 30, 2019
@DahlitzFlorian Which error?
DahlitzFlorian commentedon Oct 30, 2019
I checked my error message again and it's pretty different from the reported one:
Here are some facts concerning my environment and setup:
Hope that helps you.
tacaswell commentedon Nov 19, 2019
@DahlitzFlorian
.cpp:10:', ' src/mplutils.h:30:10: fatal error: Python.h: No such fileYou do not have the python headers installedon your systemin the virtual enviroment.I think this should be reported to pipx and pipenv as bugs.
anntzer commentedon Dec 16, 2019
Closing as there are py3.8 wheels for mpl3.1.2 on PyPI now.