50% off 所有套餐限时优惠,起价 $2.48/mo
Initial Documents

在 Linux 上安装 Python

By Parnian R. 1 min read Updated Feb 15, 2026

由于 Python 非常适合开发、脚本编写和数据分析,
在 Linux 上安装它对许多项目都很重要。在本指南中,
我们将展示如何在 Ubuntu 和 CentOS 上安装它。按照这些简单的
步骤,你可以在系统上运行 Python。

Prerequisites

在 Linux 上安装 Python 之前,请确保:

  1. 激活 Cloudzy Linux VPS: You’re on a Cloudzy
    VPS 与 Ubuntu 或 CentOS。

  2. 命令行技能: 你熟悉使用
    Linux 命令行。

  3. Admin Rights: 你拥有 root 访问权限或能够
    使用 'sudo' 运行命令。

这些步骤为在 Cloudzy 上安装 Python 做好准备
VPS.

Installing Python on
Ubuntu

  1. Update Packages:
  • SSH 到你的 VPS。

  • Type sudo apt update to refresh
    packages.

  1. Install Python:
  • 安装 Python,运行 sudo apt install python3. This
    获取最新的 Python 3。
  1. Check Version:
  • Confirm by typing python3 –version. It shows the
    Python version.
检查 Python 版本

Installing Python on
CentOS

  1. Update Packages:
  • SSH 到你的 VPS。

  • Type sudo dnf update 用于更新系统
    packages.

  1. Install Python:
  • Run sudo dnf install python3 to install Python.
    这从你的 CentOS 仓库获取默认的 Python 3。
  1. Check Version:
  • 安装后,验证一下 python3 –version. It
    显示已安装的 Python 3 版本。
检查 Python 版本 CentOS

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

Share

需要帮助?

中位响应时间不超过 1 小时。由真实客服处理,不是机器人。