首页 > 解决方案 > 删除了 Python 2.7.15 并安装了 3.7.1,但 Spyder 仍然是 python 2.7.15

问题描述

在 Spyder 中打开一个交互式显示如下:

Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 18:37:09)[MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.7.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

如您所见,它仍然显示 Python 2.7.15。如何更改 Spyder 使用的 Python 版本?

标签: pythonspyder

解决方案


首先,我需要更多信息才能给你指路。您使用的是 Windows、Mac 还是 Linux?

它为什么如此重要?因为 Mac 和 Linux 已经有了原生的 python 2,所以这可能是冲突的。

同样,由于我们谈论的是 Anaconda,它作为一个虚拟环境工作,因此可以包含您的计算机上不可用的特定库和其他组件,因此您应该直接在那里安装 python 3。

试试这个:如何使用 conda 升级到 Python 3.6?


推荐阅读