由于 Python 非常适合开发、脚本编写和数据分析,
在 Linux 上安装它对许多项目都很重要。在本指南中,
我们将展示如何在 Ubuntu 和 CentOS 上安装它。按照这些简单的
步骤,你可以在系统上运行 Python。
Prerequisites
在 Linux 上安装 Python 之前,请确保:
-
激活 Cloudzy Linux VPS: You’re on a Cloudzy
VPS 与 Ubuntu 或 CentOS。 -
命令行技能: 你熟悉使用
Linux 命令行。 -
Admin Rights: 你拥有 root 访问权限或能够
使用 'sudo' 运行命令。
这些步骤为在 Cloudzy 上安装 Python 做好准备
VPS.
Installing Python on
Ubuntu
- Update Packages:
-
SSH 到你的 VPS。
-
Type sudo apt update to refresh
packages.
- Install Python:
- 安装 Python,运行 sudo apt install python3. This
获取最新的 Python 3。
- Check Version:
- Confirm by typing python3 –version. It shows the
Python version.

Installing Python on
CentOS
- Update Packages:
-
SSH 到你的 VPS。
-
Type sudo dnf update 用于更新系统
packages.
- Install Python:
- Run sudo dnf install python3 to install Python.
这从你的 CentOS 仓库获取默认的 Python 3。
- Check Version:
- 安装后,验证一下 python3 –version. It
显示已安装的 Python 3 版本。

恭喜!你已成功在 Ubuntu 和
CentOS in Cloudzy VPS。如果您需要更多信息或进一步
如有疑问,请随时通过以下方式联系我们的支持团队 submitting a
ticket.