unbuntu切换python版本的方法-创新互联
创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!
这篇文章主要介绍unbuntu切换python版本的方法,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
Ubuntu系统自带两个版本的python,一般不需要自己再安装python,只要设置一下切换版本就好了。
首先输入update-alternatives --list python
得到输出update-alternatives: error: no alternatives for python
表示 Python 的替代版本尚未被update-alternatives 命令识别。
使用下面的命令更新python列表:
# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 # update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
再次输入# update-alternatives --list python
得到以下输出
然后使用下方的命令随时在列出的 Python 替代版本中任意切换了。
# update-alternatives --config python
以上是unbuntu切换python版本的方法的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联-成都网站建设公司行业资讯频道!
当前名称:unbuntu切换python版本的方法-创新互联
网页路径:http://pwwzsj.com/article/deccoh.html