Python multiple versions

We can install both python2 and python3 in windows.
For install, I got C:\Tools\Python27 and C:\Tools\Python37.

  • In Environment Variables - System Variables - Path, add C:\Tools\Python27\, C:\Tools\Python27\Scripts, C:\Tools\Python37\ and C:\Tools\Python37\Scripts.
  • Rename python.exe in python2 to python2.exe, rename python.exe in python3 to python3.exe.
  • Us python2 to stand for python 2.x, and python3 to stand for python 3.x.
  • Use python2 -m pip install xxx to install lib for python2.x, use python3 -m pip install xxx to install lib for python3.x.

你可能感兴趣的:(Python multiple versions)