解决Spyder无法正确处理Tensorflow或者pytorch的spyder‑kernels问题

问题核心:python语言的版本不一致,一般3.8及以下没有太大问题
如何解决?出现下面问题怎么办?
The Python environment or installation whose interpreter is located at
F:\py\Anaconda3\envs\sdsd_torch\python.exe
doesn’t have the spyder‑kernels module or the right version of it installed (>= 2.2.1 and < 2.3.0). Without this module is not possible for Spyder to create a console for you.

You can install it by activating your environment (if necessary) and then running in a system terminal:
conda install spyder‑kernels=2.2
or
pip install spyder‑kernels==2.2.*

我以tensorflow为例:
(1)打开Powershell Prompt
conda env list
找到你环境的名字,这里我是tf2.6
(2)激活环境
conda activate tf2.6
(3)最关键的一步
conda install spyder
等于说重装一个以tensorflow的ipykernels作为spyder‑kernels,然后在你的菜单栏出现新的spyder选项,点击打开即可。(如果打开异常可以重启电脑)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值