You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But at the moment of runnig your program I've this error:
File "rec.py", line 1, in
from matplotlib.widgets import RectangleSelector
File "/usr/lib/python3.2/site-packages/matplotlib/init.py", line 105, in
import os, re, shutil, subprocess, sys, warnings
File "/usr/lib/python3.2/subprocess.py", line 378, in
import select
File "/home/simone/spz/select.py", line 1, in
from pylab import *
File "/usr/lib/python3.2/site-packages/pylab.py", line 1, in
from matplotlib.pylab import *
File "/usr/lib/python3.2/site-packages/matplotlib/pylab.py", line 222, in
from matplotlib import mpl # pulls in most modules
File "/usr/lib/python3.2/site-packages/matplotlib/mpl.py", line 1, in
from matplotlib import artist
File "/usr/lib/python3.2/site-packages/matplotlib/artist.py", line 6, in
from matplotlib import docstring, rcParams
ImportError: cannot import name rcParams
I'm using the GIT version with python 3 under ArchLinux.
But I've observed the same problem with matplotlb 1.1.1 on python 2
Reacted by Ling Jian, Xiaoyi Yin and Gladkikh Prohor
This is not a bug. The problem is that subprocess is trying to import the python library select module, but it is instead finding your own select.py, and that is trying to pull in all of pylab, while matplotlib.widgets was still in the early stages of importing matplotlib/init.py. You need to rename your select.py to avoid the name clash, or run from a different directory, or take spz out of your PYTHONPATH, if that is the way your select is being found.
When i try to from matplotlib import pyplot as plt
I am facing the same issue
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'
Ah, you seem to have some sort of name collision going on. you have a
module called `dis.py`, which is taking precedence over the standard
library module of the same name. Now, this shouldn't be happening in
python3.5. Could you double-check which version of python you are running?
On Thu, Dec 13, 2018 at 6:04 AM santhoshav15 ***@***.***> wrote:
OS: Ubuntu 16.04
Python Version: 3.5.2
Matplotlib Version: 3.0.2
When i try to from matplotlib import pyplot as plt
I am facing the same issue
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-KKAIUA8uGJ13X4STmRlLph1IZrwks5u4jQygaJpZM4AKSQk>
.
I'm getting the same error under very similar circumstances (importing matplotlib pyplot with a failure in the attempt to load colorbar, then martist, then rcParams), but I do not have dis.py or any other python (.py) files in my working directory. However, I think (but am not sure) that the problem started after I installed statsmodels. I'm running a jupyter notebook within a conda environment with python 3.6 and matplotlib-3.0.2-py36_1002.
On Thu, Jan 31, 2019 at 6:37 PM John Strong ***@***.***> wrote:
I'm getting the same error under very similar circumstances (importing
matplotlib pyplot with a failure in the attempt to load colorbar, then
martist, then rcParams), but I do not have dis.py or any other python (.py)
files in my working directory. However, I think (but am not sure) that the
problem started after I installed statsmodels. I'm running a jupyter
notebook within a conda environment with python 3.6 and
matplotlib-3.0.2-py36_1002.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-I6vzJKZteVV8Ba4fyNKWSPLy2MBks5vI34jgaJpZM4AKSQk>
.
On Fri, Feb 1, 2019 at 8:08 AM John Strong ***@***.***> wrote:
Thanks for taking time to respond. Here's the traceback:
After the import
from matplotlib import pyplot as plt
I get
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-52-99ba79ecbbfb> in <module>
----> 1 from matplotlib import pyplot as plt
C:\Anaconda3\envs\py36-keras\lib\site-packages\matplotlib\pyplot.py in <module>
30 from cycler import cycler
31 import matplotlib
---> 32 import matplotlib.colorbar
33 import matplotlib.image
34 from matplotlib import rcsetup, style
C:\Anaconda3\envs\py36-keras\lib\site-packages\matplotlib\colorbar.py in <module>
26
27 import matplotlib as mpl
---> 28 import matplotlib.artist as martist
29 import matplotlib.cbook as cbook
30 import matplotlib.collections as collections
C:\Anaconda3\envs\py36-keras\lib\site-packages\matplotlib\artist.py in <module>
8
9 import matplotlib
---> 10 from . import cbook, docstring, rcParams
11 from .path import Path
12 from .transforms import (Bbox, IdentityTransform, Transform, TransformedBbox,
ImportError: cannot import name 'rcParams'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1280 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-A1XiuxSgpmx9OI0rQmyU6nb3GOqks5vJDxmgaJpZM4AKSQk>
.
These problems occur in a newly created conda environment where I installed matplotlib in the usual way: conda install matplotlib -n py36-keras
After experiencing all these difficulties I tried uninstalling and reinstalling as well as: conda install matplotlib -c conda-forge -n py36-keras
Versions: python 3.6 and matplotlib-3.0.2-py36_1002.
The fact you can't even print the __version__ means your install is broken.
I'd clean up your conda install - in particular, I don't think you want the C:\Anaconda3 path in there, but I'm not an expert on how conda works on Windows machines.
@pluviosilla If you are still having trouble, probably worth opening a new issue. But please make sure its not a conda problem first, which this really seems to be. We can't really debug install issues.
I still have the same issue, is there any solution. I tried uninstalling and installing matplotlib but I still get the same error message: ImportError: cannot import name 'rcParams' from 'matplotlib' (unknown location)
I still have the same issue, is there any solution. I tried uninstalling and installing matplotlib but I still get the same error message: ImportError: cannot import name 'rcParams' from 'matplotlib' (unknown location)
Activity
efiring commentedon Sep 19, 2012
This is not a bug. The problem is that subprocess is trying to import the python library select module, but it is instead finding your own select.py, and that is trying to pull in all of pylab, while matplotlib.widgets was still in the early stages of importing matplotlib/init.py. You need to rename your select.py to avoid the name clash, or run from a different directory, or take spz out of your PYTHONPATH, if that is the way your select is being found.
santhoshav15 commentedon Dec 13, 2018
OS: Ubuntu 16.04
Python Version: 3.5.2
Matplotlib Version: 3.0.2
When i try to
from matplotlib import pyplot as pltI am facing the same issue
Any solution?
WeatherGod commentedon Dec 13, 2018
santhoshav15 commentedon Dec 14, 2018
@WeatherGod I have
pip3(only forpython 3), nopipinstalled. Python version 3.5.2 standard that comes along with standard Ubuntu 16.04I had even opened a thread ImportError: cannot import name 'rcParams'
The issue got fixed obviously after i changed the name of
dis.pypluviosilla commentedon Jan 31, 2019
I'm getting the same error under very similar circumstances (importing matplotlib pyplot with a failure in the attempt to load colorbar, then martist, then rcParams), but I do not have dis.py or any other python (.py) files in my working directory. However, I think (but am not sure) that the problem started after I installed statsmodels. I'm running a jupyter notebook within a conda environment with python 3.6 and matplotlib-3.0.2-py36_1002.
WeatherGod commentedon Feb 1, 2019
pluviosilla commentedon Feb 1, 2019
Thanks for taking time to respond. Here's the traceback:
After the import
from matplotlib import pyplot as pltI get
WeatherGod commentedon Feb 1, 2019
pluviosilla commentedon Feb 1, 2019
How can I verify that it is valid? You can view the file here.
jklymak commentedon Feb 1, 2019
@pluviosilla Can you do
Its just that your install is messed up somehow - running the debugging will help us see how.
pluviosilla commentedon Feb 1, 2019
Nothing changes, unfortunately:
pluviosilla commentedon Feb 1, 2019
And changing the debugging level has no effect on the amount of spew.
jklymak commentedon Feb 1, 2019
That means that you do not have a recent matplotlib installed in
C:\Anaconda3\envs\py36-kerasTry updating.pluviosilla commentedon Feb 1, 2019
These problems occur in a newly created conda environment where I installed matplotlib in the usual way:
conda install matplotlib -n py36-kerasAfter experiencing all these difficulties I tried uninstalling and reinstalling as well as:
conda install matplotlib -c conda-forge -n py36-kerasVersions: python 3.6 and matplotlib-3.0.2-py36_1002.
jklymak commentedon Feb 1, 2019
Does conda really install in
C:\Anaconda3on Windows? What doesconda infogive you?You can also try:
pluviosilla commentedon Feb 1, 2019
Here's what I get:
As for my conda installation info, here's what I get:
jklymak commentedon Feb 1, 2019
The fact you can't even print the
__version__means your install is broken.I'd clean up your conda install - in particular, I don't think you want the
C:\Anaconda3path in there, but I'm not an expert on how conda works on Windows machines.pluviosilla commentedon Feb 1, 2019
I don't think the "Anaconda3" is the problem. Been using that for ages and never had this kind of problem before.
I have a number of conda environments. Maybe too many.
WeatherGod commentedon Feb 1, 2019
jklymak commentedon Feb 2, 2019
@pluviosilla If you are still having trouble, probably worth opening a new issue. But please make sure its not a conda problem first, which this really seems to be. We can't really debug install issues.
MorganWeiss commentedon Jan 27, 2020
I still have the same issue, is there any solution. I tried uninstalling and installing matplotlib but I still get the same error message: ImportError: cannot import name 'rcParams' from 'matplotlib' (unknown location)
kvamsi7 commentedon Jun 13, 2021
Have you tried
conda install -f matplotlibdentalfloss1 commentedon Jun 16, 2023
I have this issue and I don't have anaconda at all