import numpy as np
from numpy.random import default_rng
import matplotlib.pyplot as plt
import line
from python import display
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In [12], line 3
1 import numpy as np
2 from numpy.random import default_rng
----> 3 import matplotlib.pyplot as plt
4 import line
5 from python import display
ModuleNotFoundError: No module named 'matplotlib'
import numpy as np
from numpy.random import default_rng
from python import display
import matplotlib.pyplot as plt
import line
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In [13], line 4
1 import numpy as np
2 from numpy.random import default_rng
----> 4 from python import display
5 import matplotlib.pyplot as plt
6 import line
ModuleNotFoundError: No module named 'python'
i wonna make graph...................................................................................
Isn't display
part of ipython
?
Could you post pip freeze
to get an overview of your installed python modules?
ModuleNotFoundError
means there is a problem trying import a module into your application. Often this is because you don't have the module available locally (ie not installed). It can also be because you've mistyped the import statement or are trying to import the module using the wrong name.
In your case:
from python import display
doesn't make much sense. Python is not a package, as far as I'm aware. Where did this line of code come from? Where is the display()
function you are trying to use?
----> 3 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
This means the matplotlib library is not installed. You can install it using:
python3 -m pip install matplotlib
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.