A. Python command not found
Often occur after you install the following python problem, can not find the python command, this is because the Windows installation path environment variable is not defined in python
This time we first find the installation path of python (or right-click on the icon Python IDE, and select Open file location)
Right-click on the address bar => copy the address text
=> Right this computer (or right-Explorer file manager in the space) => Click on Properties => select Advanced System Settings in the system
=> Click Environment Variables
=> The following system variables box, double-click the Path => Select New => python path will be copied before the startup file is pasted to the environment variable
=> The way to determine
Then re-open the black window (command prompt) execution python, you will see the ability to run python
Two. Pip command not found
pip python command is a command automatically installed after the installation, as the installation path pip added to the environment variable with the above, where the installation path generally pip Scripts file in the same directory in the startup file python
The same copy path to the installation environment variable to
Then the black window (command prompt) execution pip command, found an error
Unable to create process using '"h:\python\python.exe" "G:\PYTHON\Scripts\pip.exe" '
Solution:
1. Switch to the installation directory pip, such as my installation directory G: \ PYTHON \ Scripts
2. In the space Shift + Right => select Open Powershell window here
3. Do install python pip.exe install SomePackage
4. After successful installation perform error still pip , pip prompted to upgrade
5. Perform python -m pip install --upgrade pip
6. After the upgrade is successful, execute pip again, OK the
III. Add Qinghua source configured to pip under Windows
Download python module package before the download time source is not configured Tsinghua slow and often given, for example
Solution:
1. In the address bar enter the Explorer %appdata%
after the carriage return, open the folder appdata
2. Create a new folder pip, pip create a new profile folder inside pip.ini
:
3. After write the following in the configuration file and save it:
[global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn
Use pip again, that will use the new source.