How to install python2 and python3

Download link: https://www.python.org/downloads/windows/

Download python2 first

 Download python3 again

Install python2 first

Double click to run

The following situation occurs because there is no environment variable configured

Configure environment variables

Right-click "Computer", then click "Properties", then click "Advanced System Settings", select "Path" under the "System Variables" window, and double-click

If you find that the system variable is still unavailable after you set it, then restart it. I believe in restarting Dafa.

Install python3

 So far, python3 and python2 are installed

When you need python2 pip, you only need py -2 -m pip install xxx.
When you need python3 pip, you only need py -3 -m pip install xxx

When you need python2 to run the script, eg py -2 sqlmap.py -h

When you need python3 to run the script, eg py -3 dirsearch.py ​​-h

If due to some local area network reasons, "connection timeout" appears when using pip, the connection timeout can be downloaded from the domestic mirror website:

  • http://e.pypi.python.org
  • http://pypi.douban.com/simple

The command is as follows:

pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com packagename # packagename is the name of the package to be downloaded 
pip install -i http://e.pypi.python.org --trusted-host e.pypi.python.org --upgrade pip # upgrade pip

Guess you like

Origin blog.csdn.net/qq_32393893/article/details/107203108