因此,Buster 似乎默认加载了 2.7 版和替代的 3.7 版 Python。但是,我将这个 Raspberry Pi 3 B+ 用于仅与 Python 3.5 兼容的应用程序。如何将 Python 3.5 作为默认版本运行或从 Buster 中完全删除 3.7?
原文由 Stigma 发布,翻译遵循 CC BY-SA 4.0 许可协议
因此,Buster 似乎默认加载了 2.7 版和替代的 3.7 版 Python。但是,我将这个 Raspberry Pi 3 B+ 用于仅与 Python 3.5 兼容的应用程序。如何将 Python 3.5 作为默认版本运行或从 Buster 中完全删除 3.7?
原文由 Stigma 发布,翻译遵循 CC BY-SA 4.0 许可协议
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.4k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
2 回答2k 阅读✓ 已解决
我真的相信你可以从源代码库安装 python3.5。
如果你想安装 python 3.5.4 :
sudo apt-get install python3.5
如果你想安装 python 3.5.3 (Debian Stretch):
以 root 身份编辑
/etc/apt/source.list
并添加以下 repos,deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free
rpi firmware deb http://archive.raspberrypi.org/debian/ stretch main ui
然后使用以下命令从目标仓库安装特定的包版本:
sudo apt-get install python3.5 -t stretch
如果想安装 pip3.5(我猜你需要):
wget https://bootstrap.pypa.io/get-pip.py
python3.5 ./get-pip.py