第一种方法: pip安装: py -2 -m pip install …… py -3 -m pip install …… 运行代码: py -2 py.py py -2 py.py第二种方法: 运行代码: 在代码前加 #! python2 #! python3