简体   繁体   中英

Why can't my matplotlib import more than one file

I have 2 folders. Both of which I will import matplotlib as the module. In the first file matplotlib runs as usual,

but in the second file an error like this occurs

ModuleNotFoundError                       Traceback (most recent call last)
c:\Users\HP\Documents\my python for data science and ml\basicmatplotlib\basicMatplotlib.ipynb Cell 1 in <cell line: 2>()
      1 import numpy as np
----> 2 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'matplotlib'

This is the error file error image (left: file runs normally, right: file error)

try to install matplotlib in terminal

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM