Skip to content

Installation issue: py-matplolib conflicts with system matplotlib #20043

@jacobmerson

Description

@jacobmerson

The following error seems to exist if there is a version of matplotlib installed with the system package manager. The spack version of the package does not work as expected. Based on the information here, possibly spack isn't correctly linking the mpl_toolkits folder?

Steps to reproduce the issue

$ spack install py-matplotlib
$ spack load py-matplotlib
$ python3 -c "import matplotlib.pyplot"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/mersoj/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/py-matplotlib-3.3.3-hoj5zbtgg6ayuek2ce6sjouhqhh2pkkq/lib/python3.8/site-packages/matplotlib/pyplot.py", line 43, in <module>
    from matplotlib.figure import Figure, figaspect
  File "/home/mersoj/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/py-matplotlib-3.3.3-hoj5zbtgg6ayuek2ce6sjouhqhh2pkkq/lib/python3.8/site-packages/matplotlib/figure.py", line 18, in <module>
    from mpl_toolkits.mplot3d import Axes3D
  File "/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/__init__.py", line 1, in <module>
    from .axes3d import Axes3D
  File "/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/axes3d.py", line 42, in <module>
    class Axes3D(Axes):
  File "/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/axes3d.py", line 50, in Axes3D
    def __init__(
  File "/home/mersoj/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/py-matplotlib-3.3.3-hoj5zbtgg6ayuek2ce6sjouhqhh2pkkq/lib/python3.8/site-packages/matplotlib/docstring.py", line 80, in dedent_interpd
    return interpd(func)
  File "/home/mersoj/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/py-matplotlib-3.3.3-hoj5zbtgg6ayuek2ce6sjouhqhh2pkkq/lib/python3.8/site-packages/matplotlib/docstring.py", line 40, in __call__
    func.__doc__ %= self.params
KeyError: 'scale'

Information on your system

  • Spack: 0.16.0-31-a67bf0ca7
  • Python: 3.8.5
  • Platform: linux-ubuntu20.04-broadwell
  • Concretizer: original

python is external system python 3.8.5

@adamjstewart

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • [N/A] I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions