zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Python 安装与环境配置

2023-06-13 09:18:29 时间

【Python 安装与环境配置】

一、下载 Python

二、安装 Python

  • 双击安装包
  • 勾选
    • Install launcher for all users (recommended)
    • Add Python 3.8 to PATH
  • 点击 Customize installation
  • 勾选
    • Documentation
    • pip
    • tcl/tk and IDLE
    • Python test suite
    • py launcher
    • for all users (requires elevation)
  • 点击 Next
  • 勾选
    • Install for all users
    • Associate files with Python (requires the py launcher)
    • Create shortcuts for installed applications
    • Add Python to environment variables
    • Precompile standard library
  • 修改安装路径
  • 点击 Install
  • 安装完成

三、配置 Python 与 pip

安装时勾选了 Add Python 3.8 to PATH 则会自动配置

python.exe 位于 python 安装根目录。

pip.exe 位于 python 安装根目录里的 Scripts 目录内。

将以上路径的全局路径分别添加到系统的 Path 环境变量中。

打开 命令行 分别键入 pythonpip 成功识别即为配置成功。

四、配置 IDLE

idle.bat/idle.py 位于 python 安装根目录里的 Lib\idlelib 目录内。

将以上路径的全局路径添加到系统的 Path 环境变量中。

打开 命令行 键入 IDLE 成功识别即为配置成功。