- #1
- 2,168
- 193
I wrote a basic plotting code and I run it on the VS code my somehow the program cannot run it
I deleted python itself and VS code and I downloaded them again, but the problem is not solved.
Any idea why this happens ?
I deleted python itself and VS code and I downloaded them again, but the problem is not solved.
Python:
import matplotlib.pyplot as plt
x = [1,2,3]
y = [4,5,6]
plt.plot(x,y)
plt.show()
Python:
Traceback (most recent call last):
File "c:/Users/xxx/Desktop/Cmpt Physics/dreams.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\__init__.py", line 138, in <module>
from . import cbook, rcsetup
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\rcsetup.py", line 24, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\fontconfig_pattern.py", line 18, in <module>
from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd,
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\pyparsing.py", line 104, in <module>
import copy
File "c:\Users\xxx\Desktop\Cmpt Physics\copy.py", line 5, in <module>
from pylab import plot,show,grid
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\pylab.py", line 218, in <module>
from matplotlib.dates import (
File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\dates.py", line 156, in <module>
from matplotlib import rcParams
ImportError: cannot import name 'rcParams' from 'matplotlib' (C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\__init__.py)
Any idea why this happens ?