PyCharm使用--只难

 一、Traceback (most recent call last):   File "D:\File\PycharmProjects\Test\main.py", line 5, in <module>     import numpy as np ModuleNotFoundError: No module named 'numpy'

1.卸载

pip uninstall numpy

2.安装

直接到需要安装的路径,右键打开终端

pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple

安装任何需要的库,都可以用https://pypi.tuna.tsinghua.edu.cn/simple
只需要将 库名 替换
比如:tensorflow
  
  pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

python 安装numpy,matplotlib 清华源快速安装_numpy清华源_Vertira的博客-CSDN博客

初学者NumPy 、SciPy、matplotlib库安装及sklearn的安装_Sunshine_502的博客-CSDN博客

python安装numpy、matplotlib和scipy的方法 - 知乎

python|如何使用pip安装、卸载、更新第三方模块 - 知乎

 

二、FileNotFoundError: [Errno 2] No such file or directory: 'iris.csv'

import csv
# 定义文件路径
csv_path = 'C:/Users/Xu/Desktop/iris.csv'    //改为自己文件所在的绝对路径

df_full = pd.read_csv(csv_path)    //原来是df_full = pd.read_csv("iris.c0sv")
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值