简体   繁体   English

我的 Anaconda 突然停止工作

[英]My Anaconda stopped working all of a sudden

My Anaconda stopped working after I installed some packages for statistics (not entirely sure if it is related), I cannot open Jupyter Notebook or Spyder, I can only open Anaconda navigator from the Anaconda command prompt and once there, if I try to run Jupyter or Spyder I get this error message: My Anaconda stopped working after I installed some packages for statistics (not entirely sure if it is related), I cannot open Jupyter Notebook or Spyder, I can only open Anaconda navigator from the Anaconda command prompt and once there, if I try to run Jupyter或 Spyder 我收到此错误消息:

`Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\server.py", line 20, in 
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\notebook\notebookapp.py", line 49, in 
from zmq.eventloop import ioloop
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\__init__.py", line 47, in 
from zmq import backend
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 40, in 
reraise(*exc_info)
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\backend\__init__.py", line 27, in 
_ns = select_backend(first)
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py", line 6, in 
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from 'zmq.backend.cython' (C:\Users\Jorge87\AppData\Roaming\Python\Python37\site-packages\zmq\backend\cython\__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\jupyter-lab-script.py", line 5, in 
from jupyterlab.labapp import main
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab\labapp.py", line 14, in 
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\__init__.py", line 4, in 
from .app import LabServerApp
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\app.py", line 9, in 
from .server import ServerApp
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\server.py", line 26, in 
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
`

I tried uninstalling Python and installing it again, I tried also uninstalling Anaconda and installing it again but nothing seems to work.我尝试卸载 Python 并再次安装,我也尝试卸载 Anaconda 并再次安装,但似乎没有任何效果。

I also tried updating Anaconda and writing the command 'Activate Root' and then 'conda update' as I saw in other solutions in stack overflow but nothing seems to work.我还尝试更新 Anaconda 并编写命令“激活根”,然后编写“conda update”,正如我在堆栈溢出的其他解决方案中看到的那样,但似乎没有任何效果。

I´m using Windows in case this is relevant.我正在使用 Windows 以防万一。

try to reinstall the jupyter_server module since it is the one that is giving you an error.尝试重新安装 jupyter_server 模块,因为它是给您错误的模块。 (I do not know if you are working on the base.) (我不知道你是否在基地工作。)

or try to create a virtual environment and run it without anything else (the version of python you have)或者尝试创建一个虚拟环境并在没有任何其他内容的情况下运行它(您拥有的 python 版本)

 conda create --name envexample python=3.7
There you will know if the base environment is corrupted and not the instances themselves. 在那里,您将知道基础环境是否已损坏,而不是实例本身。

or do you have another option to reinstall everything还是您有其他选择来重新安装所有内容

 conda update --all --no-pin --no-channel-priority

install jupyter_server may help安装 jupyter_server 可能会有所帮助

conda install -c conda-forge jupyter_server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM