print(sys.executable)
得到地址,如:/opt/anaconda3/envs/baogao/bin/python3.6
/opt/anaconda3/envs/baogao/bin/python3.6
在当前环境的控制台中使用命令:
where python
得到结果:
/opt/anaconda3/envs/baogao/bin/python /opt/anaconda3/bin/python /usr/bin/python