Python multiple versions
2018-12-29 本文已影响3人
JaedenKil
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
, addC:\Tools\Python27\
,C:\Tools\Python27\Scripts
,C:\Tools\Python37\
andC:\Tools\Python37\Scripts
. - Rename
python.exe
inpython2
topython2.exe
, renamepython.exe
inpython3
topython3.exe
. - Us
python2
to stand for python 2.x, andpython3
to stand for python 3.x. - Use
python2 -m pip install xxx
to install lib for python2.x, usepython3 -m pip install xxx
to install lib for python3.x.