pyhton各版本安装到不同目录,如:
1、E:\Program Files (x86)\python3.4.3
2、E:\Program Files\Python37
将各个版本的路径添加到环境变量,如:
- python3.7
E:\Program Files\Python37
E:\Program Files\Python37\Scripts - python3.4.3
E:\Program Files (x86)\python3.4.3
E:\Program Files (x86)\python3.4.3\Scripts
更改python.exe名称
进入E:\Program Files (x86)\python3.4.3找到python.exe重命名为python34.exe
cmd使用
- 输入python -V 得到python3.7.1
- 输入pip -V 得到pip 22.1.2 from e:\program files\python37\lib\site-packages\pip (python 3.7)
- 输入python34 -V 得到python3.4.3
- 输入python34 -m pip34 -V 得到pip 6.0.8 from E:\Program Files (x86)\python3.4.3\lib\site-packages (python 3.4)