Jupyter keeps producing a 500 error no matter what (new and existing notebooks)

636 views Asked by At

I am running into a 500: Internal Server Error when launching Jupyter, and trying to open or create a notebook. I checked multiple threads here, but nothing worked. I also tried installing, reinstalling, installing from within PyCharm, and from the commandline. I used the steps on Juypter official website as well. I installed it using pip, not conda (my interpreter is 3.6). I ran the troubleshooting command. Here is my output:

C:\Users\User>jupyter troubleshoot
$PATH:
        c:\program files\python36\lib\site-packages\pywin32_system32
        C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp
        C:\Program Files\Python36\Scripts\
        C:\Program Files\Python36\
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin
        C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\libnvvp
        C:\Windows\system32
        C:\Windows
        C:\Windows\System32\Wbem
        C:\Windows\System32\WindowsPowerShell\v1.0\
        C:\Windows\System32\OpenSSH\
        C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
        C:\Program Files\NVIDIA Corporation\NVIDIA NGX
        C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
        C:\WINDOWS\system32
        C:\WINDOWS
        C:\WINDOWS\System32\Wbem
        C:\WINDOWS\System32\WindowsPowerShell\v1.0\
        C:\WINDOWS\System32\OpenSSH\
        C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.1\
        C:\ProgramData\chocolatey\bin
        C:\Users\User\AppData\Local\Microsoft\WindowsApps

        C:\Program Files\JetBrains\PyCharm 2020.2.4\bin


sys.path:
        C:\Program Files\Python36\Scripts\jupyter-troubleshoot.EXE
        c:\program files\python36\python36.zip
        c:\program files\python36\DLLs
        c:\program files\python36\lib
        c:\program files\python36
        C:\Users\User\AppData\Roaming\Python\Python36\site-packages
        c:\program files\python36\lib\site-packages
        c:\program files\python36\lib\site-packages\win32
        c:\program files\python36\lib\site-packages\win32\lib
        c:\program files\python36\lib\site-packages\Pythonwin

sys.executable:
        c:\program files\python36\python.exe

sys.version:
        3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]

platform.platform():
        Windows-10-10.0.17763-SP0

where jupyter:
        C:\Program Files\Python36\Scripts\jupyter.exe

pip list:
        Package                       Version
        ----------------------------- ----------
        absl-py                       0.11.0
        alabaster                     0.7.12
        alembic                       1.4.3
        altair                        4.1.0
        argon2-cffi                   20.1.0
        astor                         0.8.1
        astunparse                    1.6.3
        async-generator               1.10
        attrs                         20.3.0
        Babel                         2.9.0
        backcall                      0.2.0
        base58                        2.0.1
        bleach                        3.2.1
        blinker                       1.4
        blis                          0.7.3
        cached-property               1.5.2
        cachetools                    4.1.1
        catalogue                     1.0.0
        certifi                       2020.11.8
        certipy                       0.1.3
        cffi                          1.14.4
        chardet                       3.0.4
        click                         7.1.2
        colorama                      0.4.4
        cryptography                  3.3.1
        cycler                        0.10.0
        cymem                         2.0.4
        decorator                     4.4.2
        defusedxml                    0.6.0
        dlatk                         1.1.8
        docutils                      0.16
        en-core-web-sm                2.3.1
        entrypoints                   0.3
        gast                          0.3.3
        gitdb                         4.0.5
        GitPython                     3.1.11
        google-auth                   1.23.0
        google-auth-oauthlib          0.4.2
        google-pasta                  0.2.0
        grpcio                        1.33.2
        h5py                          2.10.0
        ibm-cloud-sdk-core            1.7.3
        ibm-watson                    4.7.1
        idna                          2.10
        imagesize                     1.2.0
        importlib-metadata            3.1.0
        ipykernel                     5.3.4
        ipyparallel                   6.3.0
        ipython                       7.16.1
        ipython-genutils              0.2.0
        ipywidgets                    7.5.1
        jedi                          0.17.2
        Jinja2                        2.11.2
        joblib                        0.17.0
        json5                         0.9.5
        jsonschema                    3.2.0
        jupyter-client                6.1.7
        jupyter-core                  4.7.0
        jupyter-telemetry             0.1.0
        jupyterhub                    1.3.0
        jupyterlab                    2.2.9
        jupyterlab-pygments           0.1.2
        jupyterlab-server             1.2.0
        Keras                         2.3.1
        Keras-Applications            1.0.8
        Keras-Preprocessing           1.1.2
        kiwisolver                    1.3.1
        Mako                          1.1.3
        Markdown                      3.3.3
        MarkupSafe                    1.1.1
        matplotlib                    3.3.3
        mistune                       0.8.4
        murmurhash                    1.0.4
        mysqlclient                   2.0.1
        nbclient                      0.5.1
        nbconvert                     6.0.7
        nbformat                      5.0.8
        nest-asyncio                  1.4.3
        nltk                          3.5
        nose                          1.3.7
        notebook                      6.1.5
        numpy                         1.18.5
        oauthlib                      3.1.0
        opencv-python                 4.1.2.30
        opt-einsum                    3.3.0
        packaging                     20.7
        pandas                        0.25.3
        pandocfilters                 1.4.3
        parso                         0.7.1
        pathtools                     0.1.2
        patsy                         0.5.1
        pickleshare                   0.7.5
        Pillow                        8.0.1
        pip                           20.3.1
        pip-autoremove                0.9.1
        plac                          1.1.3
        plotly                        4.13.0
        preshed                       3.0.4
        prometheus-client             0.9.0
        prompt-toolkit                3.0.3
        protobuf                      3.14.0
        psutil                        5.7.3
        pyarrow                       2.0.0
        pyasn1                        0.4.8
        pyasn1-modules                0.2.8
        pycparser                     2.20
        pydeck                        0.5.0
        Pygments                      2.7.2
        PyJWT                         1.7.1
        pyOpenSSL                     20.0.0
        pyparsing                     2.4.7
        pyrsistent                    0.17.3
        PySocks                       1.7.1
        python-dateutil               2.8.1
        python-editor                 1.0.4
        python-json-logger            2.0.1
        pytz                          2020.4
        pywin32                       300
        pywinpty                      0.5.7
        PyYAML                        5.3.1
        pyzmq                         20.0.0
        regex                         2020.11.13
        requests                      2.25.0
        requests-oauthlib             1.3.0
        retrying                      1.3.3
        rsa                           4.6
        ruamel.yaml                   0.16.12
        ruamel.yaml.clib              0.2.2
        scikit-learn                  0.18.2
        scipy                         1.5.4
        Send2Trash                    1.5.0
        setuptools                    50.3.2
        six                           1.15.0
        sklearn                       0.0
        smmap                         3.0.4
        snowballstemmer               2.0.0
        spacy                         2.3.4
        Sphinx                        3.3.1
        sphinxcontrib-applehelp       1.0.2
        sphinxcontrib-devhelp         1.0.2
        sphinxcontrib-htmlhelp        1.0.3
        sphinxcontrib-jsmath          1.0.1
        sphinxcontrib-qthelp          1.0.3
        sphinxcontrib-serializinghtml 1.1.4
        SQLAlchemy                    1.3.20
        srsly                         1.0.4
        statsmodels                   0.12.1
        streamlit                     0.72.0
        tensorboard                   2.4.0
        tensorboard-plugin-wit        1.7.0
        tensorflow                    2.3.1
        tensorflow-estimator          2.3.0
        tensorflow-gpu-estimator      2.3.0
        termcolor                     1.1.0
        terminado                     0.9.1
        testpath                      0.4.4
        textblob                      0.15.3
        thinc                         7.4.3
        threadpoolctl                 2.1.0
        toml                          0.10.2
        toolz                         0.11.1
        tornado                       6.1
        tqdm                          4.54.0
        traitlets                     4.3.3
        tweepy                        3.9.0
        tzlocal                       2.1
        urllib3                       1.26.2
        vaderSentiment                3.3.2
        validators                    0.18.1
        wasabi                        0.8.0
        watchdog                      0.10.4
        wcwidth                       0.2.5
        webencodings                  0.5.1
        websocket-client              0.48.0
        Werkzeug                      1.0.1
        wheel                         0.36.0
        widgetsnbextension            3.5.1
        wrapt                         1.12.1
        zipp                          3.4.0

In my error log, I found the following issues (I can't write the full log here due to text limits):

[W 21:45:31.216 NotebookApp] Error loading server extension ipyparallel.nbextension
    ModuleNotFoundError: No module named 'contextvars'
    ImportError: cannot import name 'AsyncGenerator'
1

There are 1 answers

0
hayfreed On

I recommend that you update your python version. Make sure that your jupyter installation is running with the new version and not 3.6.0.