Install python on windows

Install python on windows

1. Enter the python official website https://www.python.org/

Download the configuration environment, click downloads above, and select the python environment to download according to the system (select windows)

[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-yuZAwoPR-1681367613629) (C:\Users\zhangmj2\Desktop\VMware Workstation\Picture\image-20230309154815305.png )]

Scroll down to find the version you need and download it

[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-EUX5f29A-1681367613632) (C:\Users\zhangmj2\Desktop\VMware Workstation\Picture\image-20230309154635745.png )]

After downloading, double-click to install python.

How to check whether the installation is successful

Use [win+r] to bring up the [Run] pop-up window, enter "cmd" and then open the [Command Prompt].

Enter python

This is the display of successful installation. It is the python version you installed above and is related to the version you installed.

As long as ">>>>" appears, it proves that your installation is successful.

When you see ">>>", it means you have entered the python interactive mode. In this case, you need to enter exit() and press Enter to exit. The brackets are English brackets, in English.

This will appear later. After entering interactive mode, remember to exit (remember remember remember)

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-HWkKd6YN-1681367613633) (C:\Users\zhangmj2\Desktop\VMware Workstation\Picture\image-20230309155954668.png )]

2.Install pip

pip is a Python package management tool that provides the functions of finding, downloading, installing, and uninstalling Python packages.

Enter pip on the command line to check whether pip is installed.

The following picture appears, indicating that pip has been installed

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-4eN8yhKF-1681367613634) (C:\Users\zhangmj2\Desktop\VMware Workstation\Picture\image-20230309160334698.png )]

Upgrade pip

pip install --upgrade pip, and press Enter

If the network speed is too slow and red appears, download and upgrade directly through the Tsinghua mirror.

python -m pip install --upgrade pip
-ihttp://pypi.douban.com/simple --trusted-host http://pypi.douban.com,并回车

或者下面这条:

python -m pip install --user --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple

[External link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-Bsc0ctIZ-1681367613635) (C:\Users\zhangmj2\Desktop\VMware Workstation\Picture\image-20230309160525619.png )]

3. Install the module (myqr module at level 17)

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple myqr --user
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple myqr
其他镜像链接:

阿里云
http://mirrors.aliyun.com/pypi/simple/

中国科技大学
https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban)
http://pypi.douban.com/simple/

清华大学
https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学
http://pypi.mirrors.ustc.edu.cn/simple/

【注意】正常安装模块的语句是:pip install 【模块名字】比如(pip install myqr,其中myqr是模块的名字),但是由于某些同学网速过慢会出现爆红或者进度条不动,每每下载不成功,所以这边直接拿取清华的镜像链接过来,比较快。

Insert image description here

Enter pip list to check whether the installation is successful.

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_48824655/article/details/130129960