记录一次Anaconda安装Spyder失败及解决方法
之前换了电脑硬盘,需要重装anaconda。安装成功以后,在base环境下安装并打开Spyder成功。之后新建了一个环境,在此环境中安装Spyder成功,打开时失败并报错:
ModuleNotFoundError: No module named 'IPython.core.inputtransformer2’
猜测可能是因为安装时直接在anaconda可视化界面上点击图标安装,有些包没装全。
之后打开Anaconda Prompt,运行pip uninstall Spyder卸载,再运行conda install Spyder。再次尝试,成功打开Spyder。但是打开后弹出以下提示框:
报错:AttributeError: ‘_ModuleMock’ object has no attribute 'PLUGIN_CLASS’
根据大佬经验贴,在Anaconda Prompt中依次输入以下内容:
conda remove spyder-kernels
conda install spyder-kernels=0.*
conda install spyder=3.3.1
再次打开Spyder,问题解决。
感谢以下链接:
https://blog.csdn.net/yayadazui/article/details/104334274.
https://www.zhihu.com/question/372658255.