Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ImportError: cannot import name 'rcParams' #13407

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

Closed
RohanJ24 opened this issue Feb 11, 2019 · 4 comments
Closed

ImportError: cannot import name 'rcParams' #13407

RohanJ24 opened this issue Feb 11, 2019 · 4 comments
Labels
Community support Users in need of help.

Comments

@RohanJ24
Copy link

Traceback (most recent call last):
File "/home/ewebcore/Desktop/numpy.py", line 18, in
from matplotlib import pyplot as plt
File "/usr/lib/python3/dist-packages/matplotlib/init.py", line 123, in
from . import cbook
File "/usr/lib/python3/dist-packages/matplotlib/cbook/init.py", line 36, in
import numpy as np
File "/home/ewebcore/Desktop/numpy.py", line 18, in
from matplotlib import pyplot as plt
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 32, in
import matplotlib.colorbar
File "/usr/lib/python3/dist-packages/matplotlib/colorbar.py", line 32, in
import matplotlib.artist as martist
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 15, in
from . import cbook, docstring, rcParams
ImportError: cannot import name 'rcParams'

Give me solution for above error

@ImportanceOfBeingErnest
Copy link
Member

Please don't name any script you want to run by the same name as a package you have installed. That is, don't call your script numpy.py.

@RohanJ24
Copy link
Author

Please don't name any script you want to run by the same name as a package you have installed. That is, don't call your script numpy.py.

Still I got same error:

Traceback (most recent call last):
File "/home/ewebcore/Desktop/testing.py", line 18, in
from matplotlib import pyplot as plt
File "/usr/lib/python3/dist-packages/matplotlib/init.py", line 123, in
from . import cbook
File "/usr/lib/python3/dist-packages/matplotlib/cbook/init.py", line 36, in
import numpy as np
File "/home/ewebcore/Desktop/numpy.py", line 18, in
from matplotlib import pyplot as plt
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 32, in
import matplotlib.colorbar
File "/usr/lib/python3/dist-packages/matplotlib/colorbar.py", line 32, in
import matplotlib.artist as martist
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 15, in
from . import cbook, docstring, rcParams
ImportError: cannot import name 'rcParams'

@anntzer anntzer added the Community support Users in need of help. label Feb 11, 2019
@ImportanceOfBeingErnest
Copy link
Member

Yes you have added a different script now, but the initial numpy.py is still present. Delete that file.

@RohanJ24
Copy link
Author

Yes you have added a different script now, but the initial numpy.py is still present. Delete that file.

It works... Thanx !! : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community support Users in need of help.
Projects
None yet
Development

No branches or pull requests

3 participants