jupyter notebook error from ubuntu using WSL

Asked by Kathryn McPherson

Hi, I have been using Jupyter Notebook from Ubuntu, using a Windows Subsystem for Linux, but it has suddenly stopped working. I followed these instructions to be able to access jupyter notebook from Ubuntu https://medium.com/@sayanghosh_49221/jupyter-notebook-in-windows-subsystem-for-linux-wsl-f075f7ec8691. When i type "jupyter notebook" into ubuntu (which used to give me a link which I copied into Microsoft Edge) it now comes up with the following:

Traceback (most recent call last):
  File "/home/kathmcp02/.local/bin/jupyter-notebook", line 5, in <module>
    from notebook.notebookapp import main
  File "/home/kathmcp02/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 44, in <module>
    from jinja2 import Environment, FileSystemLoader
ImportError: cannot import name 'Environment' from 'jinja2' (/home/kathmcp02/.local/lib/python3.8/site-packages/jinja2/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in <module>
    import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
  File "/usr/lib/python3/dist-packages/requests_unixsocket/__init__.py", line 4, in <module>
    from .adapters import UnixAdapter
  File "/usr/lib/python3/dist-packages/requests_unixsocket/adapters.py", line 3, in <module>
    from requests.adapters import HTTPAdapter
ImportError: cannot import name 'HTTPAdapter' from 'requests.adapters' (/home/kathmcp02/.local/lib/python3.8/site-packages/requests/adapters.py)

Original exception was:
Traceback (most recent call last):
  File "/home/kathmcp02/.local/bin/jupyter-notebook", line 5, in <module>
    from notebook.notebookapp import main
  File "/home/kathmcp02/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 44, in <module>
    from jinja2 import Environment, FileSystemLoader
ImportError: cannot import name 'Environment' from 'jinja2' (/home/kathmcp02/.local/lib/python3.8/site-packages/jinja2/__init__.py)

It was all working fine this morning, but suddenly came up with this error this afternoon. Have I done something wrong? Any help would be much appreciated. Thank you!

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.