阿尔卑斯山Python3的密码?

2024-05-18 05:52:31 发布

您现在位置:Python中文网/ 问答频道 /正文

有没有一个Alpine包允许我为Python 3安装PyCrypto?

在遇到pip3 install pycrypto的问题之后,我偶然发现了这篇文章,它使用apk add py-numpy@testing解释how to install numpy in Alpine。PyCrypto也可以使用apk add py-crypto为Python2.7安装。然而,我似乎不知道如何为Python3调用pycrypto,甚至不知道这个包是否存在。

作为另一种解决方案,我尝试使用apk add gcc安装C编译器gcc,以便pip3 install pycrypto中的安装工具可以编译。但是,当我已经使用gcc运行该命令时,它会抛出一个致命错误:

...
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/pip-build-2TivSm/pycrypto':
configure: error: C compiler cannot create executables
...

在Alpine中没有办法编译Python3模块吗?


Tags: installinpybuildnumpyaddconfigurepip3