termux 无法安装 numpy

背景介绍

我有一个数学计算的项目,需要用到
numpy,手边没有电脑,就想在手机的termux上面安装numpy.
运行

pip install numpy

后,在Installing backend dependencies ...时报错了

[end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

看来是安装依赖的时候出错了

解决方法

用 termux 的包管理器安装

pkg install python-numpy

成功!

总结

事实证明,在pip不可以用的时候,可以尝试用系统的包管理器安装所需依赖包

<包管理器> install/-S/... python-<包名>

可以安装大部分pip包

如果这样不行的话,就只能重装pip或者Python试试了
实在不行就到github上clone然后自己构建了

(the end)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值