【问题标题】:How do I install libraries in PyCharm?如何在 PyCharm 中安装库?
【发布时间】:2020-07-17 05:00:48
【问题描述】:

我通过 cmd 使用 pip install matplotlib 安装了 matpotlib 库。该库在 IDLE 中运行良好,但我无法在 PyCharm 中导入它。我尝试直接在Pycharm中安装库,但显示错误。I have attached an image of error it shows while installing through pycharm.

【问题讨论】:

    标签: python-3.x matplotlib pycharm


    【解决方案1】:

    在启动项目时,PyCharm 会为每个项目创建一个新的虚拟环境,否则会提及。您在一般环境中安装 matplotlib,因此在此环境中不存在。

    尝试使用 PyCharm 的终端,而不是通过搜索可用包进行安装。它将在项目的虚拟环境中。还有pip install matplotlib

    否则,使用您已经创建的安装 matplotlib 的虚拟环境启动项目

    【讨论】:

      猜你喜欢
      • 2015-07-02
      • 2013-12-03
      • 2020-11-13
      • 2020-12-14
      • 1970-01-01
      • 2023-02-01
      • 2020-10-10
      • 1970-01-01
      • 2018-01-14
      相关资源
      最近更新 更多