写点什么

VSCode 提示没有模块“matplotlib” VSCode 中文

作者:柠檬与橘子
  • 2025-06-14
    河北
  • 本文字数:218 字

    阅读完需:约 1 分钟

将 matplotlib 安装上,在命令提示符中输入以下内容:


pip install matplotlib
复制代码


打开 VSCode 后 :


import matplotlib.pyplot as plt
复制代码


每次我尝试运行我的程序时:


ModuleNotFoundError:没有名为“matplotlib”的模块


  1. 设置我的 python 路径,使用带有“where python”的命令提示符来验证正确的路径。

  2. 然后将该路径放在环境变量“PATH”下。

  3. 接下来,我使用以下命令在 VS Code 中运行一个终端:“pip install matplotlib”,然后所有内容都下载、安装并解析。

Visual Studio Code

用户头像

还未添加个人签名 2023-03-27 加入

还未添加个人简介

评论

发布
暂无评论
VSCode 提示没有模块“matplotlib” VSCode中文_柠檬与橘子_InfoQ写作社区