File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,14 @@ Python 作为一门年长但恰逢新春的解释型语言,亦被业界广泛
312312
313313由于使用过于广泛,几乎每一份 Linux 都带有 Python 解释器,以命令 `python3` 调用。
314314
315+ !!! note
316+
317+ 部分更早的发行版中会包含 Python 2,且默认将 `python` 命令指向 Python 2,但是对于现代的 Linux 发行版,我们建议安装 `python-is-python3` 包,使得 `python` 命令指向 `python3`。
318+
319+ ```console
320+ $ sudo apt install python-is-python3
321+ ```
322+
315323# ## 包管理器 pip {#py-pip}
316324
317325为使用外部的第三方包,Python 提供了一个包管理器:pip。
@@ -390,7 +398,7 @@ $ pip3 install -r requirements.txt
390398
391399#### 其他的:pip-tools、pipenv、uv…… {#py-dep-other}
392400
393- Python 有非常多的依赖管理方案。其中 ** uv ** 是近年来备受瞩目的新工具,它用 Rust 编写,集成了包管理、虚拟环境管理和 Python 版本管理,速度极快,被认为是 Python 工具链的未来。
401+ Python 有非常多的依赖管理方案。其中 [ uv ] ( https://github.com/astral-sh/uv ) 是近年来备受瞩目的新工具,它用 Rust 编写,集成了包管理、虚拟环境管理和 Python 版本管理,速度极快,被认为是 Python 工具链的未来。
394402
395403### Virtualenv 与 venv {#py-venv}
396404
@@ -428,7 +436,8 @@ $ python3 -m venv venv
428436
429437### Python 的版本 {#py-versions}
430438
431- Python 2 已在 2020 年初正式宣告停止维护。
439+ Python 2 已在 2020 年初正式宣告停止维护,由于已淘汰多年,所以本教程不再做更多介绍。
440+
432441现在的 Python,最新的版本已到 3.14(截至 2025 年 9 月)。实际上还在使用中的 Python 版本,主要在 3.9 以上。
433442
434443!!! tip "我应该选择哪个版本的 Python?"
You can’t perform that action at this time.
0 commit comments