Debian 系统 安装Python

Debian 系统 安装Python

OpenStick(开源 U 盘棒主机,ARM64 架构),跑的是 Debian 11 (Bullseye)。

OpenStick 本质是一个U 盘大小的迷你 ARM 开发主机,插 USB 口就能上电,自带 USB 网口 / WiFi,很多是基于全志 H618、H313 这类 ARM 芯片,架构:aarch64(arm64),不是普通电脑 x86。

特点:极其稳定,适合嵌入式、网关、小型服务器;缺点软件版本老。

1、解决系统404报错

# 覆盖写入可用源(Bullseye arm64)
cat > /etc/apt/sources.list <<'EOF'
deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates main contrib non-free
deb http://archive.debian.org/debian-security bullseye-security main contrib non-free
EOF

# 更新源
apt update

2、安装 Python

# 第一步
apt install --reinstall python3.9 python3

# 第二步
apt -f install

3、设置软连接

ln -s /usr/bin/python3.9 /usr/bin/python3
# 或
ln -s /usr/bin/python3.9 /usr/bin/python

最终效果

root@openstick:/# python
Python 3.9.2 (default, May 14 2026, 03:00:00) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("你好,世界!")
你好,世界!
>>> 
posted @ 2026-10-07 23:50  Q&25  阅读(10)  评论(0)    收藏  举报