FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ImportError: cannot import name 'rcParams' · Issue #12983 · matplotlib/matplotlib · GitHub

Repository navigation

ImportError: cannot import name 'rcParams' #12983

Closed

Description

OS: Ubuntu 16.04
Python Version: 3.5.2
Matplotlib Version: 3.0.2

When i try to from matplotlib import pyplot as plt

Traceback (most recent call last):
File "try.py", line 2, in
from matplotlib import pyplot as plt
File "/home/artivatic/.virtualenvs/test/lib/python3.5/site-packages/matplotlib/init.py", line 124, in
import inspect
File "/usr/lib/python3.5/inspect.py", line 35, in
import dis
File "/home/artivatic/Documents/Santhosh/data/ori_data/dis.py", line 1, in
from matplotlib import pyplot as plt
File "/home/artivatic/.virtualenvs/test/lib/python3.5/site-packages/matplotlib/pyplot.py", line 32, in
import matplotlib.colorbar
File "/home/artivatic/.virtualenvs/test/lib/python3.5/site-packages/matplotlib/colorbar.py", line 28, in
import matplotlib.artist as martist
File "/home/artivatic/.virtualenvs/test/lib/python3.5/site-packages/matplotlib/artist.py", line 10, in
from . import cbook, docstring, rcParams
ImportError: cannot import name 'rcParams'

Any solution?

Activity

  1. tacaswell commented on Dec 13, 2018

    Member

    The issue is that you have a dis.py in your current directory (File "/home/artivatic/Documents/Santhosh/data/ori_data/dis.py", line 1, in) that is shadowing the built in dis module. We import dis (via inspect) in matplotlib/__init__.py, your dis then import matplotlib.pyplot which tries to get things out of the matplotlib module before it has finished setting it's self up.

    The solution is to run python from a path that does not have files that shadow the standard library.

    I am going to close this because there is nothing we can do at the Matplotlib level to avoid this problem.

  2. added this to the milestone on Dec 13, 2018
  3. FerCris commented on May 9, 2019

    i have the same problem, uninstall matplotlib and then install again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL