省流版:遇事不决,就重装。重装一次不行,就两次。
——————
许久没用的spyder昨天一打开就闪退,跟着大佬们教程经历了一系列安装又卸载pyqt5,包括在Anaconda navigator中手动卸载又安装spyder后,我不得不承认,这个软件被我搞废了。
无奈之下又开始了漫长的卸载并重装anaconda的路程。
安装了最新版本的anaconda后,发现spyder依然闪退……没关系,又活了一天。
——————
根据http://t.csdn.cn/4si02这篇文章里的步骤,新的一天,我又开始试图解决spyder闪退问题。
每次启动,都只出现这个界面,就直接闪退了。开始尝试。
先是在Anaconda Prompt中输入spyder --new-instance,出现以下报错:
fromIccProfile: failed minimal tag size sanity
D:\Anaconda3\lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
Traceback (most recent call last):
File "D:\Anaconda3\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "D:\Anaconda3\lib\site-packages\spyder\app\start.py", line 266, in main
mainwindow.main(options, args)
File "D:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 1822, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "D:\Anaconda3\lib\site-packages\spyder\app\utils.py", line 289, in create_window
main.setup()
File "D:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 773, in setup
PLUGIN_REGISTRY.register_plugin(self, PluginClass,
File "D:\Anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 342, in register_plugin
instance = self._instantiate_spyder5_plugin(
File "D:\Anaconda3\lib\site-packages\spyder\api\plugin_registration\registry.py", line 184, in _instantiate_spyder5_plugin
plugin_instance = PluginClass(main_window, configuration=CONF)
File "D:\Anaconda3\lib\site-packages\spyder\api\plugins\new_api.py", line 331, in __init__
container.setup()
File "D:\Anaconda3\lib\site-packages\spyder\plugins\pythonpath\container.py", line 55, in setup
self._load_pythonpath()
File "D:\Anaconda3\lib\site-packages\spyder\plugins\pythonpath\container.py", line 136, in _load_pythonpath
system_path = get_system_pythonpath()
File "D:\Anaconda3\lib\site-packages\spyder\plugins\pythonpath\utils.py", line 31, in get_system_pythonpath
env = get_user_env()
File "D:\Anaconda3\lib\site-packages\spyder\utils\environ.py", line 71, in get_user_env
env_dict = get_user_environment_variables()
File "D:\Anaconda3\lib\site-packages\spyder\utils\environ.py", line 60, in get_user_environment_variables
res = stdout.decode().strip().split(os.linesep)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 49: invalid start byte
看不懂,没关系,先放着,我又去输入pip check,看看能不能发现问题,显示为:
gensim 4.3.0 requires fuzzytm, which is not installed.
conda-repo-cli 1.0.27 has requirement clyent==1.2.1, but you have clyent 1.2.2.
conda-repo-cli 1.0.27 has requirement nbformat==5.4.0, but you have nbformat 5.7.0.
真不戳,跟攻略里大佬们的问题没一个是相同的。
看到一个帖子说他在base外的另一个env上启动spyder,得到了和我相似的错误,博主最终没能解决这个问题。但我想,我的这个问题是否也是出在环境配置上呢。
麻爪了,我只是个文科生啊!!!!!
在anaconda navigator界面对spyder进行降级
再次启动尝试。震惊!这次是走到了下面这个界面才闪退的!
再次输入 spyder --new-instance
这次的报错代码短了好多!可歌可泣!
fromIccProfile: failed minimal tag size sanity
D:\Anaconda3\lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
Bad file descriptor (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100)
再看看pip check
gensim 4.3.0 requires fuzzytm, which is not installed.
spyder 5.2.2 has requirement pyqt5<5.13, but you have pyqt5 5.15.7.
spyder 5.2.2 has requirement pyqtwebengine<5.13, but you have pyqtwebengine 5.15.4.
conda-repo-cli 1.0.27 has requirement clyent==1.2.1, but you have clyent 1.2.2.
conda-repo-cli 1.0.27 has requirement nbformat==5.4.0, but you have nbformat 5.7.0.
spyder降级了,对应的pyqt5也要跟着降嘛,我懂。
然后试图跟着http://t.csdn.cn/tefwD这一篇再来。
第一步卸载pyqt5,疯狂报错。再下载pyqt5的5.13版本,没能成功,且疯狂报错。我真的不行了。
再次去anaconda navigator界面对spyder进行降级,刚刚从5.4降到了5.2,这次再降到5.0试试,55555还是打不开。我还是继续重装吧。
——————
这次没有选择安装最新的anaconda版本,保守的选了5.3.1版本,据说这个对应的python是3.7,比较主流。
一通操作后,打开cmd分别输入python和conda --version检查,都没问题,再次打开spyder。成功进入界面(跪地大哭)。
顺便贴个汉化包安装攻略:http://t.csdn.cn/hngYW