当我在Anaconda中打开Spyder时,Spyder指出在启动Spyder内核时发生了错误。我已经尝试过(在终端中)来自Spyder的两个建议命令。然而,在我重新启动Anaconda并打开Spyder后,同样的问题存在,所以我不知道如何解决这个问题。谢谢你的帮助!
以下是打开Spyder时Spyder所说的内容:
终端中的结果如下所示。
以下是打开Spyder时Spyder所说的内容:
An error occurred while starting the kernel
Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed. Without this module is not possible for Spyder to create a console for you.
You can install it by running in a system terminal:
conda install spyder‑kernels=0.*
or
pip install spyder‑kernels==0.*
终端中的结果如下所示。
(base) pn-204-190:~ yangboning$ conda install spyder-kernels=0.*
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(base) pn-204-190:~ yangboning$ pip install spyder-kernels==0.*
Requirement already satisfied: spyder-kernels==0.* in ./opt/anaconda3/lib/python3.7/site-packages (0.5.2)
Requirement already satisfied: ipykernel>=4.8.2 in ./opt/anaconda3/lib/python3.7/site-packages (from spyder-kernels==0.*) (5.1.2)
Requirement already satisfied: wurlitzer; platform_system != "Windows" in ./opt/anaconda3/lib/python3.7/site-packages (from spyder-kernels==0.*) (1.0.3)
Requirement already satisfied: pyzmq>=17 in ./opt/anaconda3/lib/python3.7/site-packages (from spyder-kernels==0.*) (18.1.0)
Requirement already satisfied: cloudpickle in ./opt/anaconda3/lib/python3.7/site-packages (from spyder-kernels==0.*) (1.2.2)
Requirement already satisfied: jupyter-client>=5.2.3 in ./opt/anaconda3/lib/python3.7/site-packages (from spyder-kernels==0.*) (5.3.3)
Requirement already satisfied: traitlets>=4.1.0 in ./opt/anaconda3/lib/python3.7/site-packages (from ipykernel>=4.8.2->spyder-kernels==0.*) (4.3.3)
Requirement already satisfied: ipython>=5.0.0 in ./opt/anaconda3/lib/python3.7/site-packages (from ipykernel>=4.8.2->spyder-kernels==0.*) (7.8.0)
Requirement already satisfied: tornado>=4.2 in ./opt/anaconda3/lib/python3.7/site-packages (from ipykernel>=4.8.2->spyder-kernels==0.*) (6.0.3)
Requirement already satisfied: python-dateutil>=2.1 in ./opt/anaconda3/lib/python3.7/site-packages (from jupyter-client>=5.2.3->spyder-kernels==0.*) (2.8.0)
Requirement already satisfied: jupyter-core in ./opt/anaconda3/lib/python3.7/site-packages (from jupyter-client>=5.2.3->spyder-kernels==0.*) (4.5.0)
Requirement already satisfied: ipython-genutils in ./opt/anaconda3/lib/python3.7/site-packages (from traitlets>=4.1.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.2.0)
Requirement already satisfied: six in ./opt/anaconda3/lib/python3.7/site-packages (from traitlets>=4.1.0->ipykernel>=4.8.2->spyder-kernels==0.*) (1.12.0)
Requirement already satisfied: decorator in ./opt/anaconda3/lib/python3.7/site-packages (from traitlets>=4.1.0->ipykernel>=4.8.2->spyder-kernels==0.*) (4.4.0)
Requirement already satisfied: jedi>=0.10 in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.15.1)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (2.0.10)
Requirement already satisfied: pygments in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (2.4.2)
Requirement already satisfied: pickleshare in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.7.5)
Requirement already satisfied: appnope; sys_platform == "darwin" in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.1.0)
Requirement already satisfied: setuptools>=18.5 in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (41.4.0)
Requirement already satisfied: pexpect; sys_platform != "win32" in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (4.7.0)
Requirement already satisfied: backcall in ./opt/anaconda3/lib/python3.7/site-packages (from ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.1.0)
Requirement already satisfied: parso>=0.5.0 in ./opt/anaconda3/lib/python3.7/site-packages (from jedi>=0.10->ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.5.1)
Requirement already satisfied: wcwidth in ./opt/anaconda3/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.1.7)
Requirement already satisfied: ptyprocess>=0.5 in ./opt/anaconda3/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->ipython>=5.0.0->ipykernel>=4.8.2->spyder-kernels==0.*) (0.6.0)
(base) pn-204-190:~ yangboning$