Pycharm安装包numpy和matplotlib安装

环境

python 3.12

Pycharm 2023.1

安装包

创建图表的 numpy 库和 matplotlib

安装过程出现的问题

  1. setuptools工具包没有安装
powershell 复制代码
Python packaging tool 'setuptools' not found

文件 -> 设置 -> 项目:xxx -> python解释器界面显示不出已安装的软件包,系统提示需要安装工具包

  1. 直接点击系统提示的安装工具包,安装失败
powershell 复制代码
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
  1. 利用本地终端,输入命令行pip install setuptools,显示pip没有安装
powershell 复制代码
无法将"pip"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1

解决办法

  1. 环境变量设置
    找到python安装路径下的Scripts下的pip.exe

    复制路径

    找到文件 -> 设置 -> 工具 -> 终端界面的环境变量,添加环境变量path,值为
powershell 复制代码
pip.exe路径;Scripts文件夹路径

例如

powershell 复制代码
D:\Program Files\python3.12.3\Scripts\pip.exe;D:\Program Files\python3.12.3\Scripts\
  1. 升级pip解决安装出现的问题2

本地终端输入

powershell 复制代码
py -m ensurepip --upgrade
powershell 复制代码
py -m pip install --upgrade pip
powershell 复制代码
pip install setuptools
powershell 复制代码
python3.12 -m pip install --upgrade setuptools

再次打开文件 -> 设置 -> 项目:xxx -> python解释器界面,已安装软件包能正常显示,表示setuptools安装成功

  1. 安装numpy和matplotlib库

安装完成后python解释器的软件安装包界面显示numpy和matplotlib安装包,表示安装成功

相关推荐
QQ_19632884753 天前
Python-flask框架西山区家政服务评价系统网站设计与开发-Pycharm django
python·pycharm·flask
开发者小天4 天前
python安装 Matplotlib 库 安装 Seaborn 库
开发语言·python·matplotlib
kong79069289 天前
Python核心语法-Matplotlib简介
开发语言·python·matplotlib
闪电橘子10 天前
Pycharm运行程序报错 Process finished with exit code -1066598273 (0xC06D007F)
ide·python·pycharm·cuda
我要七分甜10 天前
Pycharm中Anaconda的详细配置过程
python·pycharm
Franklin10 天前
2025-11-28日,天塌了,Pycharm将不开源了!!最后一个开源社区版本2025.2.5
ide·python·pycharm
wx_bishe28810 天前
python社区流浪动物猫狗救助救援网站_4a4i2--论文_pycharm django vue flask
python·pycharm·django·毕业设计
澾慟10 天前
PyCharm Remote Interpreter连接远程服务器运行IndexTTS2
pycharm· indextts2· remote interpreter
智慧地球(AI·Earth)10 天前
在Windows上使用Claude Code并集成到PyCharm IDE的完整指南
ide·人工智能·windows·python·pycharm·claude code
思绪无限10 天前
使用Conda创建Python环境并在PyCharm中配置运行项目
python·pycharm·conda·安装教程·python环境配置·环境配置教程