所以,似乎我的计算机的python(python 2和3)配置都以某种秘密方式搞砸了。最初,我使用“应用程序和功能”而不是“卸载程序”卸载了Enthought Canopy(Windows 10 64位)。一旦通过Anaconda运行spyder,我在ipython窗口中运行了“help(”modules“)”并收到以下错误:
C:\Users\Jacob\Anaconda3\lib\site-packages\IPython\kernel\__init__.py:13:
ShimWarning: The `IPython.kernel` package has been deprecated. You should
import from ipykernel or jupyter_client instead.
"You should import from ipykernel or jupyter_client instead.", ShimWarning)
对于不同的文件,几个类似的错误,似乎是随机的。
在这些错误似乎压倒了系统后,它会删除之前的日志并将其替换为一个标题为“启动内核时出错”的红色框“
Windows fatal exception: access violation
Thread 0x00002850 (most recent call first):
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\parentpoller.py",
line 94 in run
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 916 in _bootstrap_inner
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 884 in _bootstrap
Thread 0x00000f5c (most recent call first):
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 295 in wait
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 551 in wait
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\IPython\core\history.py",
line 834 in run
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\IPython\core\history.py",
line 60 in needs_sqlite
File "", line 2 in run
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 916 in _bootstrap_inner
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 884 in _bootstrap
Thread 0x000026c8 (most recent call first):
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\heartbeat.py",
line 61 in run
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 916 in _bootstrap_inner
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 884 in _bootstrap
Thread 0x00001fe0 (most recent call first):
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\sugar\poll.py",
line 99 in poll
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\ioloop.py",
line 122 in poll
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\tornado\ioloop.py",
line 862 in start
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\ioloop.py",
line 177 in start
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\iostream.py",
line 72 in _thread_main
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 864 in run
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 916 in _bootstrap_inner
File "C:\Users\Jacob\Anaconda3\lib\threading.py", line 884 in _bootstrap
Current thread 0x00000458 (most recent call first):
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\qtawesome\iconic_font.py",
line 209 in load_font
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\qtawesome\iconic_font.py",
line 178 in __init__
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\qtawesome\__init__.py",
line 36 in _instance
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\qtawesome\__init__.py",
line 153 in load_font
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder\utils\icon_manager.py",
line 258 in icon
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder\plugins\runconfig.py",
line 457 in RunConfigPage
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder\plugins\runconfig.py",
line 452 in
File "", line 205 in _call_with_frames_removed
File "", line 678 in exec_module
File "", line 655 in _load_unlocked
File "", line 950 in _find_and_load_unlocked
File "", line 961 in _find_and_load
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder_profiler\profiler.py",
line 22 in
File "", line 205 in _call_with_frames_removed
File "", line 678 in exec_module
File "", line 655 in _load_unlocked
File "", line 950 in _find_and_load_unlocked
File "", line 961 in _find_and_load
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder_profiler\__init__.py",
line 6 in
File "", line 205 in _call_with_frames_removed
File "", line 678 in exec_module
File "", line 655 in _load_unlocked
File "", line 950 in _find_and_load_unlocked
File "", line 961 in _find_and_load
File "C:\Users\Jacob\Anaconda3\lib\pkgutil.py", line 92 in walk_packages
File "C:\Users\Jacob\Anaconda3\lib\pydoc.py", line 2079 in run
File "C:\Users\Jacob\Anaconda3\lib\pydoc.py", line 2050 in listmodules
File "C:\Users\Jacob\Anaconda3\lib\pydoc.py", line 1899 in help
File "C:\Users\Jacob\Anaconda3\lib\pydoc.py", line 1858 in __call__
File "C:\Users\Jacob\Anaconda3\lib\_sitebuiltins.py", line 103 in __call__
File "", line 1 in
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py",
line 2881 in run_code
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py",
line 2827 in run_ast_nodes
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py",
line 2717 in run_cell
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py",
line 501 in run_cell
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py",
line 196 in do_execute
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\kernelbase.py",
line 390 in execute_request
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\kernelbase.py",
line 228 in dispatch_shell
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\kernelbase.py",
line 276 in dispatcher
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\tornado\stack_context.py",
line 275 in null_wrapper
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\zmqstream.py",
line 414 in _run_callback
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\zmqstream.py",
line 472 in _handle_recv
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\zmqstream.py",
line 440 in _handle_events
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\tornado\stack_context.py",
line 275 in null_wrapper
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\tornado\ioloop.py",
line 887 in start
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\zmq\eventloop\ioloop.py",
line 177 in start
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py",
line 474 in start
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py",
line 223 in main
File "C:\Users\Jacob\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py",
line 227 in
我试过了:
spyder --reset
除了在我的计算机上卸载每个版本的python,以及我能找到的每个目录文件夹和文件。重新安装后,会出现同样的问题。
我当前的sys.path是:
['',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\spyder\\utils\\site',
'C:\\ProgramData\\Anaconda2\\Lib\\site-packages',
'C:\\ProgramData\\Anaconda2\\Lib',
'C:\\Users\\Jacob\\Anaconda3\\python36.zip',
'C:\\Users\\Jacob\\Anaconda3\\DLLs',
'C:\\Users\\Jacob\\Anaconda3\\lib',
'C:\\Users\\Jacob\\Anaconda3',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\Sphinx-1.5.1-py3.6.egg',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\win32',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\win32\\lib',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\Pythonwin',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg',
'C:\\Users\\Jacob\\Anaconda3\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\Jacob\\.ipython']
我在网上看到的任何地方都无法找到这个特定的错误,所以希望这里有人知道问题所在。
答案 0 :(得分:3)
这看起来像https://github.com/spyder-ide/spyder/issues/4014报告的问题。在这种情况下,解决方案是将qtawesome(spyder的依赖项)升级到0.4.4或更高版本。如果使用Anaconda安装,则命令为:conda upgrade qtawesome
。