ubuntu下python2与python3共存

解决办法:分别创建python2与python3的环境
前提是安装了anaconda

1创建python2的环境
打开终端输入

conda create --name python2 python=2.7(加粗字体为激活时需要使用的)

等待创建环境

2创建python3的环境
打开终端输入
conda create --name python3 python=3.6(加粗字体为激活时需要使用的)
等待创建环境

3加入要使用Python2
终端输入: source activate python2
注销时:source deactivate python2
4效果

猜你喜欢

转载自blog.csdn.net/IT_job/article/details/80084668
今日推荐