且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 CentOS 上将 Python3.5.2 设置为默认 Python 版本?

更新时间:2022-12-05 08:49:44

如果这样

sudo ln -fs /usr/bin/python3.5 /usr/bin/python

不起作用(它应该)

您可以使用以下命令将别名添加到您的 /home/.bashrc:

you could just add an alias into your /home/.bashrcwith this command:

alias python="/usr/bin/python3.5"

如果这不起作用,您应该只使用虚拟环境.阅读此页面开始.

and if this does not work either you should just use virtual env. Read this page to get started.