Reputation: 1
This is my error traceback:
Traceback (most recent call last):
File "D:\My projects\aaa.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\SHREYANSH\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\__init__.py", line 138, in <module>
from . import cbook, rcsetup
File "C:\Users\SHREYANSH\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\rcsetup.py", line 28, in <module>
from cycler import Cycler, cycler as ccycler
File "C:\Users\SHREYANSH\AppData\Local\Programs\Python\Python37-32\lib\site-packages\cycler.py", line 46, in <module>
import six
File "D:\My projects\six.py", line 2, in <module>
import matplotlib.pyplot as plt
File "C:\Users\SHREYANSH\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\pyplot.py", line 30, in <module>
from cycler import cycler
ImportError: cannot import name 'cycler' from 'cycler' (C:\Users\SHREYANSH\AppData\Local\Programs\Python\Python37-32\lib\site-packages\cycler.py)
I tried it after reinstalling matplotlib but nothing works please help.
Upvotes: 0
Views: 1213
Reputation: 1469
In my case it was a privilege problem, I have uninstall cycler and matplotlib by:
sudo pip uninstall cycler matplotlib
and than install them again with:
pip3 install matplotlib
and it works fine, I hope that could help.
Upvotes: 0
Reputation: 31
Ouch! I found out what was happening. I was naming my sample work as one, two, three, etc. and I also had a file "six.py". Make sure you don't have a file named six.py in your path.
Upvotes: 3
Reputation: 3176
Try to install 'cycler' then install 'matplotlib'
pip install cycler
pip install matplotlib
Upvotes: -2