python The installation package can be downloaded from the official website :https://www.python.org/downloads/
This may be the most detailed in the whole network python Installation tutorial (windows):
https://blog.csdn.net/weixin_58753619/article/details/123014634
Do not check... During installation Add python3.7 to path.
1、 Generally, everyone is learning python When , The first chapter is environment construction , Configure environment variables . General tutorial may let you directly check add environment variables to during installation PATH The option to , But I generally don't recommend that you do this , Because there may be pip Useless situation . It is recommended to manually configure the environment variables .
python3 Once installed ,python3 The installation package of is integrated with pip, No need to install again pip. To configure pip The environment variable of .
1) environment variable -- Create one in the system variable PYTHON_HOME, Inside python Installation path and pip Installation path for .
2) And then PYTHON_HOME In the form of variables :%PYTHON_HOME%
.
In environment variable -- System variables --path Configure environment variables in .
In this case , Switch later python edition , Just change PYTHON_HOME The corresponding value is just .
2、 After the environment variables are configured , open cmd window , Input python -V, Will output the currently installed on your computer python Version number . Or just type in python, Hit enter , If you don't prompt, you can't find the command , That is, the configuration is successful .
【 it is to be noted that : After configuring environment variables , To reopen a new cmd Window execution command verification . The previously opened window will not load the latest environment variable configuration in real time 】
python3 and pip Installation successful
before windows10 Computer installed LR, Later, I used software to LR Even the registry was uninstalled . however LR Generated pip Not uninstalled .
There are multiple in the computer pip, When I finish installing python, Use pip It's a mistake .
In this case , First where pip
, View in PC pip There are several , Then open the environment variable - System variables -path, Delete computers that are not python Self contained pip Environment variables of , Delete them all .
Be careful : When configuring environment variables ,d Don't put the beginning of the disc on the front , Otherwise, the configured style will change .
For example, the configuration is completed path Environment variables in , The system should be based on path Environment variables configured inside , From top to bottom one by one .
link :https://jingyan.baidu.com/article/6f2f55a19fad97f4b93e6c80.html#:~:text=%E6%9C%89%E6%97%B6%E5%80%99%E5%9C%A8%E6%89%A7%E8%A1%8Cpip%E6%9B%B4%E6%96%B0%E5%A4%B1%E8%B4%A5%E5%90%8E%EF%BC%8C%E5%86%8D%E6%AC%A1%E6%89%A7%E8%A1%8Cpip%E5%91%BD%E4%BB%A4%E6%97%B6%E4%BC%9A%E6%8F%90%E7%A4%BAModuleNotFoundError%3A%20No%20module,named%20%27pip%27%E9%94%99%E8%AF%AF%EF%BC%8C%E5%AF%BC%E8%87%B4pip%E5%91%BD%E4%BB%A4%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E3%80%82%20%E6%AD%A4%E6%97%B6%E5%8F%AA%E9%9C%80%E8%A6%81%E6%89%A7%E8%A1%8C2%E6%9D%A1%E5%91%BD%E4%BB%A4%E5%8D%B3%E5%8F%AF%E5%AE%8C%E6%88%90%E4%BF%AE%E5%A4%8D%E6%93%8D%E4%BD%9C%EF%BC%81
summary :
When in execution pip update , Failure or warning occurred , Re execution pip Command error . Right click to open as administrator windows powershell. Perform the following steps in order 2 One command to complete the repair .
python -m ensurepip
python -m pip install --upgrade pip
link :https://blog.51cto.com/aiyc/4802007
Right click to open as administrator windows powershell.