安装numpy和matplotlib时出现的问题及解决方法

  1. note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for matplotlib

没有轮子型

解决方法:在pypi网站直接下载轮子然后安装到虚拟环境

下载完在网站上按那个文件夹按钮复制路径(以下配图):

回到cmd,路径下

输入: pip install 刚刚复制的那个路径\下载下来的文件的名字

例子:

Pip install D:\desktop\Pandas_learn\matplotlib-3.9.1-cp311-cp311-win_amd64.whl

安装完,测试是否安装好了:

键入:python 回车

import matplotlib 回车

print(matplotlib.__version__) 回车

看是否输出了版本号

问题2在安装numpy时出现:

(据说是python版本和numpy不兼容的问题)

TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

未知参数env

解决方法:键入 python -m pip install numpy spacy

(这个莫名其妙就解决了)

  • 5
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值