温馨提示×

Python 安装在 Ubuntu 上的路径

小樊
45
2025-12-04 16:47:30
栏目: 编程语言

在 Ubuntu 上,Python 通常安装在以下路径:

  1. Python 2.x(已停止更新):/usr/bin/python
  2. Python 3.x:/usr/bin/python3

你可以通过在终端中输入以下命令来检查 Python 的安装路径:

which python
which python3

此外,你还可以通过以下命令查看 Python 的版本信息:

python --version
python3 --version

请注意,根据你的系统和 Python 安装方式的不同,Python 的安装路径可能会有所不同。上述路径适用于大多数通过官方软件包管理器(如 apt)安装的情况。如果你使用了其他方式(如 Anaconda 或者 pyenv)安装 Python,路径可能会有所不同。

0