From 0990d13015b720b1d4885a5c2e8b64dc3a24bd57 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 25 Jan 2023 21:22:35 +0800 Subject: [PATCH] RP @geekpi https://linux.cn/article-15480-1.html --- ...nstall Python on Windows [Beginner’s Guide].md | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) rename {translated/tech => published}/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md (71%) diff --git a/translated/tech/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md b/published/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md similarity index 71% rename from translated/tech/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md rename to published/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md index 1a4b13d51f..8ef8685076 100644 --- a/translated/tech/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md +++ b/published/20230113.0 ⭐️ How to Install Python on Windows [Beginner’s Guide].md @@ -3,18 +3,20 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15480-1.html" -如何在 Windows 上安装 Python(初学者指南) +如何在 Windows 上安装 Python ====== -**这个简单的指南演示了如何在 Windows 上下载和安装 Python。** +![][0] + +> 这个简单的指南演示了如何在 Windows 上下载和安装 Python。 这篇文章是用最新的 Python 3.11 稳定版测试的。 -在学习如何在 Windows 上安装 Python 之前,你可能想看看如何在 Linux 发行版(如 Ubuntu)上[轻松安装][1] 。如果你打算成为一名开发者,最好在 Linux 中尝试 Python。既然如此,你可能想看看[如何在 Windows 之外安装 Linux(如 Ubuntu)][2]。 +在学习如何在 Windows 上安装 Python 之前,你可能想看看如何在 Linux 发行版(如 Ubuntu)上[轻松安装][1] Python。如果你打算成为一名开发者,最好在 Linux 中尝试 Python。那么,你可能想看看 [如何在 Windows 之外安装 Linux(如 Ubuntu)][2]。 Python 是一种流行的通用编程语言,在过去十年中成为开发者的选择。而且它的受欢迎程度与日俱增。它被广泛用于网络开发、复杂系统、数据科学、机器学习和所有科学领域。 @@ -22,7 +24,7 @@ Python 是一种流行的通用编程语言,在过去十年中成为开发者 ### 检查 Python 是否已经安装 -在 Windows 上安装它之前,你应该检查它是否已经安装。一般来说,它应该没有安装,不像在 Ubuntu (和其他 Linux 发行版)中,Python 是预先安装的。 +在 Windows 上安装它之前,你应该检查它是否已经安装。一般来说,它应该没有安装,不像在 Ubuntu (和其他 Linux 发行版)中,Python 是预先安装的。 从开始菜单中,打开“命令提示符”。 @@ -38,9 +40,9 @@ python --version 打开下面的 Python 官方下载页面。 -[下载 Python][3] +> **[下载 Python][3]** -![如何定位 Python 安装][4] +![如何找到要安装的 Python][4] 在顶部,你应该看到当前的稳定版本。点击下载链接。如果你正在寻找任何特定的版本,在这个页面上向下滚动,在 “Python releases by version number:” 的标签下下载特定的版本。 @@ -70,17 +72,17 @@ python --version python ``` -你可以用 CTRL+Z 和回车键退出这个 shell。 +你可以用 `CTRL+Z` 和回车键退出这个交互界面。 ### 检查 PATH 变量 -你应该用 Python 的可执行位置检查系统变量 PATH。这应该是使用安装程序自动更新的。 +你应该检查系统变量 `PATH`,看看 Python 的可执行位置是否存在。这应该是使用安装程序自动更新的。 -从开始菜单中,搜索“系统变量”并打开它。 +从开始菜单中,搜索“系统变量system variables”并打开它。 ![打开环境变量设置][8] -在“系统属性”对话框中,点击“高级>环境变量”。在用户变量部分,对照路径变量,检查 Python 的安装位置是否存在。请参考下面的图片作为指导。 +在“系统属性”对话框中,点击“高级Advanced > 环境变量Environment Variables”。在用户变量部分,对照路径变量,检查 Python 的安装位置是否存在。请参考下面的图片作为指导。 如果你看到所有的路径都存在,你就可以运行你的 Python 项目了。 @@ -88,16 +90,16 @@ python ### 创建并运行你的第一个 Python 程序 -一个额外的步骤,这里是你如何编码和运行你的第一个 Python 程序。你可以使用任意[推荐的 Python 编辑器][10]来编写你的程序。 +一个额外的步骤,这里是你如何编码和运行你的第一个 Python 程序。你可以使用任意 [推荐的 Python 编辑器][10] 来编写你的程序。 -下面是一个简单的程序,它在控制台中输出文本“debugpoint.com”。 +下面是一个简单的程序,它在控制台中输出文本 `debugpoint.com`。 ``` # Sample Python program print("debugpoint.com") ``` -用任意名字保存文件。这里我把它保存为 “hello.py”,放在 E 盘。.py 是 Python 源码的扩展名。 +用任意名字保存文件。这里我把它保存为 `hello.py`,放在 E 盘。`.py` 是 Python 源码的扩展名。 要运行这个程序,请打开命令提示符,在 E 盘中执行以下内容。 @@ -105,7 +107,7 @@ print("debugpoint.com") python hello.py ``` -**输出** +输出: ![在 Windows 中运行一个简单的 Python 程序][11] @@ -122,13 +124,13 @@ via: https://www.debugpoint.com/install-python-windows/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.debugpoint.com/author/admin1/ [b]: https://github.com/lkxed -[1]: https://www.debugpoint.com/install-python-3-11-ubuntu/ +[1]: https://linux.cn/article-15475-1.html [2]: https://www.debugpoint.com/complete-guide-how-dual-boot-ubuntu-windows/ [3]: https://www.python.org/downloads/ [4]: https://www.debugpoint.com/wp-content/uploads/2023/01/How-to-locate-Python-set-up.jpg @@ -138,4 +140,5 @@ via: https://www.debugpoint.com/install-python-windows/ [8]: https://www.debugpoint.com/wp-content/uploads/2023/01/Open-Environment-variable-Settings.jpg [9]: https://www.debugpoint.com/wp-content/uploads/2023/01/Check-Python-Environment-PATH-Values-in-Windows.jpg [10]: https://www.debugpoint.com/5-best-python-ide-code-editor/ -[11]: https://www.debugpoint.com/wp-content/uploads/2023/01/Running-a-simple-Python-program-in-Windows.jpg \ No newline at end of file +[11]: https://www.debugpoint.com/wp-content/uploads/2023/01/Running-a-simple-Python-program-in-Windows.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202301/25/211813u4mmhhffif58hmpu.jpg \ No newline at end of file