本文共 5479 字,大约阅读时间需要 18 分钟。
Installing and using Python on Windows 10 is very simple. The installation procedure involves just three steps:
在Windows 10上安装和使用Python非常简单。 安装过程仅涉及三个步骤:
To install Python, you need to download the official Python executable installer. Next, you need to run this installer and complete the installation steps. Finally, you can configure the PATH variable to use python from the command line.
要安装Python,您需要下载官方的Python可执行安装程序。 接下来,您需要运行此安装程序并完成安装步骤。 最后,您可以从命令行将PATH变量配置为使用python。
You can choose the version of Python you wish to install. It is recommended to install the latest version of Python, which is 3.7.3 at the time of writing this article.
您可以选择要安装的Python版本。 建议安装最新版本的Python,在撰写本文时为3.7.3。
Choose the optional features by checking the following check boxes:
通过选中以下复选框来选择可选功能:
Click Next.
单击下一步 。
Optionally, you can select the Associate files with Python, Create shortcuts for installed applications and other advanced options. Make note of the python installation directory displayed in this step. You would need it for the next step.
After selecting the Advanced options, click Install to start installation.
高级选项” 。 在这里,选中“ 为所有用户安装”和“ 将Python添加到环境变量”复选框。(可选)您可以选择“将文件与Python关联” ,“ 为已安装的应用程序创建快捷方式”和其他高级选项。 记下此步骤中显示的python安装目录。 下一步将需要它。
选择“高级”选项后,单击“ 安装”以开始安装。
The last (optional) step in the installation process is to add Python Path to the System Environment variables. This step is done to access Python through the command line. In case you have added Python to environment variables while setting the Advanced options during the installation procedure, you can avoid this step. Else, this step is done manually as follows.
安装过程的最后(可选)步骤是将Python路径添加到系统环境变量。 完成此步骤以通过命令行访问Python。 如果在安装过程中设置“高级”选项时已将Python添加到环境变量中,则可以避免此步骤。 否则,此步骤如下所述手动完成。
In the Start menu, search for “advanced system settings”. Select “View advanced system settings”. In the “System Properties” window, click on the “Advanced” tab and then click on the “Environment Variables” button.
在开始菜单中,搜索“高级系统设置”。 选择“查看高级系统设置”。 在“系统属性”窗口中,单击“高级”选项卡,然后单击“环境变量”按钮。
Locate the Python installation directory on your system. If you followed the steps exactly as above, python will be installed in below locations:
在系统上找到Python安装目录。 如果您完全按照上述步骤进行操作,则会在以下位置安装python:
The folder name may be different from “Python37-32” if you installed a different version. Look for a folder whose name starts with Python.
如果安装了其他版本,则文件夹名称可能与“ Python37-32”不同。 查找名称以Python开头的文件夹。
Append the following entries to PATH variable as shown below:
将以下条目添加到PATH变量中,如下所示:
You have now successfully installed Python 3.7.3 on Windows 10. You can verify if the Python installation is successful either through the command line or through the IDLE app that gets installed along with the installation.
现在,您已经在Windows 10上成功安装了Python 3.7.3。您可以通过命令行或通过随安装一起安装的IDLE应用程序来验证Python安装是否成功。
Search for the command prompt and type “python”. You can see that Python 3.7.3 is successfully installed.
搜索命令提示符,然后键入“ python”。 您可以看到Python 3.7.3已成功安装。
An alternate way to reach python is to search for “Python” in the start menu and clicking on IDLE (Python 3.7 64-bit). You can start coding in Python using the Integrated Development Environment(IDLE).
到达python的另一种方法是在开始菜单中搜索“ Python”,然后单击IDLE(Python 3.7 64位)。 您可以使用集成开发环境(IDLE)开始使用Python进行编码。
Hurray! You are ready to start developing Python applications in your Windows 10 system.
欢呼! 您已准备好开始在Windows 10系统中开发Python应用程序。
翻译自:
转载地址:http://fhlzd.baihongyu.com/