visit Python Official website : https://www.python.org/
Click on downloads Button , Select the system type from the drop-down box (windows/Mac OS/Linux etc. )
Choose to download the latest version of Python
If there is no version requirement , Try to use the latest version and previous versions . Avoid the instability of the new version
Double click download okay Python Installation package
Check the bottom left corner Add Python 3.7 to PATH Options , And then choose Install now Install now Python.
Default installation
win key + r, Input cmd enter Enter into windows Command line mode for .
Enter... On the command line Python, Correct display Python edition , It indicates that the Python Installation successful
Maybe it's because you're installing Python There is no check in the process of Add Python 3.7 to PATH Options , At this point, you need to manually adjust Python To configure .
Be careful : If during the installation process , It's already checked Add Python 3.7 to PATH Options , And in cmd Enter... In command mode python Instructions Don't complain , There is no need to manually configure Python.
Right click This computer --> choice attribute
find Python Installation directory , Add the path in .
pip It's a modern , General purpose Python Package management tools . Provide for the right to Python Bag search 、 download 、 install 、 Uninstalled features , then For us Python Management of resource packages .
install :
install Python when , Will automatically download and install pip.
pip -V
The prompt is not an internal or external command : Same as above , Add environment variables :
Install root \Scripts
pip install < Package name > Install the specified package
pip uninstall < Package name > Delete the specified package
pip list Show installed packages
pip freeze Show installed packages , And display it in the specified format
python install ipython // Installation package
python uninstall ipython // Delete ipython package
function pip install The command will download the specified python package , The default is https://files.pythonhosted.org/ Up and down the website load . This is a foreign website , When the network situation is bad , The download may fail , We can order , modify pip Now the software is Source . Format :
pip install Package name -i Domestic source address
Example : pip install ipython -i https://pypi.mirrors.ustc.edu.cn/simple/ From the University of science and technology of China (ustc) Server for
Upload and download requests( be based on python The third party of web frame )
Commonly used in China pip Download source list :
Alibaba cloud http://mirrors.aliyun.com/pypi/simple/
University of science and technology of China https://pypi.mirrors.ustc.edu.cn/simple/
douban (douban) http://pypi.douban.com/simple/
Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple/
University of science and technology of China http://pypi.mirrors.ustc.edu.cn/simple/
python
print("hello world") // Chinese single and double quotation marks are OK
exit()
sign out python Environment two ways
exit()
Press ctrl + z then =>enter