gpt4 book ai didi

python - 如何选择我在 Linux 上运行的 python 版本?

转载 作者:可可西里 更新时间:2023-11-01 11:48:47 34 4
gpt4 key购买 nike

我正在使用的 Linux 版本默认有 python 2.6,我们在一个单独的文件夹中安装了 2.7。

如果我想运行 .py 脚本,我该如何告诉它使用 2.7 而不是默认值?

最佳答案

使用 update-alternatives --config python 并从选项中选择 python2.7
如果您需要删除它,请使用 update-alternatives --remove python/usr/bin/python2.7

关于python - 如何选择我在 Linux 上运行的 python 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35047691/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com