在android上安装python包

发布于 2024-08-30 21:00:56 字数 103 浏览 1 评论 0原文

我想在 android 上从源代码安装 python 包。这可能吗?我尝试在控制台中运行 py 安装文件,但未找到 distutils (.core, ccompiler)。还可以安装它们吗?

I want to install a python package from source on android. Is this possible? I tried in the console to run the py install files, but distutils (.core, ccompiler) isn't being found. Is it possible to still install them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

娜些时光,永不杰束 2024-09-06 21:00:56

Android 不附带 Python 解释器,也不附带 gcc 或其他编译器。您需要从某处获取 ARM 二进制文件或自己交叉编译一个。 (顺便说一句,我假设是 ARM,但可以替换为您碰巧运行的任何架构)。

Android does not ship with a Python interpreter, nor does it ship with gcc or other compilers. You will need to get an ARM binary from somewhere or cross-compile one yourself. (BTW, I'm assuming ARM, but substitute in whatever architecture you happen to be running).

风尘浪孓 2024-09-06 21:00:56

如果您使用 ASE(Android 脚本环境),并且要安装的包是纯 python(即没有 C 编译库),您只需将包的目录手动复制到 sdcard 上,即 /sdcard/ase /extras/python(如 ASE 常见问题解答中指定)。

If you're using ASE (Android Scripting Environment), and the package you want to install is pure-python (that is, no C compiled libraries), you can simply copy the package's directory manually onto the sdcard, to /sdcard/ase/extras/python (as specified on the ASE FAQ).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文