gpt4 book ai didi

Python 版本问题

转载 作者:太空宇宙 更新时间:2023-11-04 10:19:15 24 4
gpt4 key购买 nike

我是 Python 的新手。但是我从我的 MAC (OS X El Capitan) 上的 python.org 下载的 pkg 文件安装 Python 3.5.0

问题是当我转到终端并发出命令时

python -V

它向我展示了 Python 2.7.10 为什么会这样以及如何删除该版本

最佳答案

每个 Linux(实际上大多数)都捆绑了 python 2.7.x。这就是它向您显示版本 2.7.10 的原因。

尝试在终端中运行:

python3

你会得到这样的东西:

Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

其中 3.4.3 是 python 版本。

同样适用于 python2。

关于Python 版本问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33361090/

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