【termux】termux安装cryptography和rust

假设你已经安装好了python

一、安装rust

pkg install rust

二、安装cryptography

1、用国内镜像下载

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

国内镜像:

这里推荐三个非常不错的国内镜像:
https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学镜像
http://pypi.douban.com/simple/ 豆瓣镜像
http://mirrors.aliyun.com/pypi/simple/ 阿里镜像

2、下载时如果提醒This package requires Rust >=1.41.0. 则执行一,下载rust后,再重新下载cryptography

3、如果提示

error: Don't know the correct rust target for system type aarch64-unknown-linux-android. Please set the CARGO_BUILD_TARGET environment variable

是下载Rust后没有设置环境变量

export CARGO_BUILD_TARGET=aarch64-linux-android

设置后重新执行

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

4、如果提示error是github 443的错误。当前网络不能访问github,我是直接更换了termux的网络,原来用的Wi-Fi,更换成手机流量就可以了,应该也可以更换源镜像之类的,因为下载成功了就没有去研究

扫描二维码关注公众号,回复: 15061186 查看本文章

参考资料

https://github.com/pyca/cryptography/issues/6610

How to Install Rust on Termux? - GeeksforGeeks

Failed building wheel for Cryptography - Termux - pyca/cryptography

猜你喜欢

转载自blog.csdn.net/mudarn/article/details/125314112
今日推荐