Numpy版本查看、降级、卸载和安装(自定义版本)

碰到的问题如下所示:

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

我们可以
查看已安装的Numpy的版本:
pip show numpy
1、卸载Numpy:
pip uninstall numpy
2、查看可以安装的Numpy版本:
pip index versions numpy
3、选择一个你想要的版本安装:
pip install -U numpy==1.9.0 
# 1.9.0是自定的版本号
安装过程中 可能出现的问题

error: subprocess-exited-with-error

可以尝试检查网络问题(有没有使用魔法)

或者 更新setuptool

pip install --upgrade setuptools
4、这里也可以直接跳过步骤2,3直接尝试
pip install -U numpy<2

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值