Skip to content

matplotlib does not build on python 3.6 #8271

@ResidentMario

Description

@ResidentMario

On ubuntu 16.04, the following fails:

  1. cd ~/Desktop
  2. git clone https://github.com/ResidentMario/matplotlib
  3. sudo apt-get install python-matplotlib
  4. cd matplotlib
  5. conda create --name matplotlib-dev pytest numpy pytz libpng cycler six python=3.6
  6. source activate matplotlib-dev
  7. pip install -v -e ./ (ref)
  8. python tests.py

With:

!!!!!!!!!!!!!!!!!!! Interrupted: 58 errors during collection !!!!!!!!!!!!!!!!!!!
=========================== 58 error in 8.59 seconds ===========================

All of the form:

___________ ERROR collecting lib/mpl_toolkits/tests/test_mplot3d.py ____________
../../miniconda3/envs/matplotlib-dev/lib/python3.6/site-packages/_pytest/python.py:418: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
../../miniconda3/envs/matplotlib-dev/lib/python3.6/site-packages/py/_path/local.py:662: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:961: in _find_and_load
    ???
<frozen importlib._bootstrap>:950: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:646: in _load_unlocked
    ???
<frozen importlib._bootstrap>:616: in _load_backward_compatible
    ???
../../miniconda3/envs/matplotlib-dev/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:216: in load_module
    py.builtin.exec_(co, mod.__dict__)
lib/mpl_toolkits/tests/test_mplot3d.py:3: in <module>
    from mpl_toolkits.mplot3d import Axes3D, axes3d, proj3d, art3d
lib/mpl_toolkits/mplot3d/__init__.py:6: in <module>
    from .axes3d import Axes3D
lib/mpl_toolkits/mplot3d/axes3d.py:21: in <module>
    import matplotlib.axes as maxes
lib/matplotlib/axes/__init__.py:4: in <module>
    from ._subplots import *
lib/matplotlib/axes/_subplots.py:10: in <module>
    from matplotlib.axes._axes import Axes
lib/matplotlib/axes/_axes.py:26: in <module>
    import matplotlib.dates as _  # <-registers a date unit converter
lib/matplotlib/dates.py:129: in <module>
    import dateutil.parser
<frozen importlib._bootstrap>:961: in _find_and_load
    ???
<frozen importlib._bootstrap>:946: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:885: in _find_spec
    ???
<frozen importlib._bootstrap_external>:1157: in find_spec
    ???
<frozen importlib._bootstrap_external>:1131: in _get_spec
    ???
<frozen importlib._bootstrap_external>:1112: in _legacy_get_spec
    ???
<frozen importlib._bootstrap>:427: in spec_from_loader
    ???
<frozen importlib._bootstrap_external>:544: in spec_from_file_location
    ???
E     File "/home/alex/miniconda3/envs/matplotlib-dev/lib/python3.6/site-packages/python_dateutil-2.6.0-py3.6.egg/dateutil/parser.py", line 50
E   SyntaxError: invalid escape sequence \.

What conda list says:

# packages in environment at /home/alex/miniconda3/envs/matplotlib-dev:
#
blas                      1.1                    openblas    conda-forge
ca-certificates           2017.1.23                     0    conda-forge
certifi                   2017.1.23                py36_0    conda-forge
cycler                    0.10.0                   py36_0    conda-forge
libgfortran               3.0.0                         1  
libpng                    1.6.28                        0    conda-forge
ncurses                   5.9                          10    conda-forge
numpy                     1.12.0          py36_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        1    conda-forge
openssl                   1.0.2h                        3    conda-forge
pip                       9.0.1                    py36_0    conda-forge
py                        1.4.32                   py36_0    conda-forge
pytest                    3.0.6                    py36_0    conda-forge
python                    3.6.0                         2    conda-forge
pytz                      2016.10                  py36_0    conda-forge
readline                  6.2                           0    conda-forge
setuptools                33.1.0                   py36_0    conda-forge
six                       1.10.0                   py36_1    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py36_0    conda-forge
xz                        5.2.2                         0    conda-forge
zlib                      1.2.11                        0    conda-forge

What apt-get --list says.

This is a python 3.6 failure. If in step six you instead do: conda create --name matplotlib-dev pytest numpy pytz libpng cycler six python=3.5, the build succeeds and all tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions