python2和python3同时存在时包的安装和运行问题

1, python2和python3同时存在时,
Python2安装模块/包:py -2 -m pip install xxx
Python3安装模块/包:py -3 -m pip install xxx

2,2和3版本同时存在时
运行Python2代码:py -2 xxx.py
运行Python3代码:py -3 xxx.py

可以再代码最开始假如一行#! python2或#! python3,这样运行时命令可简化为py xxx.py

3,Python2中首行要加入# coding: utf-8才可在代码中使用中文
此时需要
第一行: #! python2
第二行: # coding: utf-8