python - 删除了 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 版本?
解决方案
首先,我需要更多信息才能给你指路。您使用的是 Windows、Mac 还是 Linux?
它为什么如此重要?因为 Mac 和 Linux 已经有了原生的 python 2,所以这可能是冲突的。
同样,由于我们谈论的是 Anaconda,它作为一个虚拟环境工作,因此可以包含您的计算机上不可用的特定库和其他组件,因此您应该直接在那里安装 python 3。
推荐阅读
- angular - GitHub Action - 错误未定义:在参考或输入中找不到标签
- rest - 目录的 REST API 中的层次结构
- javascript - 谷歌图表 clearChart() 与 vue-google-charts
- typescript - 没有“新”就无法调用类构造函数构造 - aws cdk
- c# - 如何使用 ClosedXML 读取 Excel 下拉列表值
- javascript - 这算作 GA 中的两次综合浏览量,我需要第二次综合浏览量吗?
- c++ - 在 getBuildTasks() 中找不到客户端 URI - VSCode - C++
- javascript - 可见性断言差异
- list - 在涉及算术运算和计数元素的列表上递归?
- ios - 如何使用 swift 从 ios Healthkit 应用程序获取低心率通知?