简体   繁体   English

为什么我的 matplotlib 不能导入多个文件

[英]Why can't my matplotlib import more than one file

I have 2 folders.我有 2 个文件夹。 Both of which I will import matplotlib as the module.这两个我都会导入 matplotlib 作为模块。 In the first file matplotlib runs as usual,在第一个文件 matplotlib 照常运行,

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尝试在终端中安装 matplotlib

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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