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:

`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.

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.

I´m using Windows in case this is relevant.

2 Answers

try to reinstall the jupyter_server module since it is the one that is giving you an error. (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)

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
6

install jupyter_server may help

conda install -c conda-forge jupyter_server

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like