① Python Interpreter Installation#
-
Windows Platform
Download link: https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe (version 3.9)
Install python39
Exe installation: Pay attention to modifying the directory and environment variables
Installation path: C:/python39 (The installation path can be customized, but be careful not to include special characters such as Chinese or spaces)
Verification: Press "win+R" on the keyboard, enter "cmd", and test in the command line
C:\Users\cPenadm>==python -V==
Python 3.9.5
-
Linux Platform
Comes with python (different versions of operating systems come with different versions of python)
CentOS-yum installation (version 3.6)
yum install epel-release yum install python36 yum install python36-devel
② Setting up pip Tool#
pip is a Python package management tool that provides functions for finding, downloading, installing, and uninstalling Python packages.
Configure domestic source
Solve the problem of slow installation
-
Method 1
Upgrade pip to version 10.0 or above
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
-
Method 2
-
Windows Platform
-
Create directory and file ==C:\Users<your username>\pip\pip.ini==
-
The content of the pip.ini file is as follows: Modify it to Alibaba's source, other domestic sources are also acceptable
[global] index-url=http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com
-
-
Linux Platform
mkdir ~/.pip vim ~/.pip/pip.conf #Enter the following content [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
-
③ PyCharm Installation#
PyCharm is a Python IDE developed by JetBrains, supporting macOS, Windows, and Linux systems.
Integrated Development Environment (IDE) is an application used to provide a programming development environment, generally including code editor, compiler, debugger, and graphical user interface tools.
Advantages: User-friendly interface, debugging, syntax highlighting, project management, code navigation, intelligent suggestions, auto-completion, unit testing, version control, etc.
-
Download link
Official website: http://www.jetbrains.com/pycharm/
-
Installation
Community Edition: Free to use, no activation required
Professional Edition: More features, activation required
-
Activation
Open pycharm, execute: Help-Register
-
Configure Python Interpreter
Reference: https://zhuanlan.zhihu.com/p/40716785