Jupyter Notebook Launch Error

Hi, I am getting this launch error every time I am trying to open Jupyter Notebook through anaconda. I even tried to reinstall anaconda which didn’t help. Can someone help here in this community?

Traceback (most recent call last):
File “C:\Users\shubh\anaconda3\Scripts\jupyter-notebook-script.py”, line 6, in
from notebook.notebookapp import main
File “C:\Users\shubh\anaconda3\lib\site-packages\notebook\notebookapp.py”, line 44, in
from jinja2 import Environment, FileSystemLoader
File “C:\Users\shubh\anaconda3\lib\site-packages\jinja2_init_.py”, line 12, in
from .environment import Environment
File “C:\Users\shubh\anaconda3\lib\site-packages\jinja2\environment.py”, line 25, in
from .defaults import BLOCK_END_STRING
File “C:\Users\shubh\anaconda3\lib\site-packages\jinja2\defaults.py”, line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File “C:\Users\shubh\anaconda3\lib\site-packages\jinja2\filters.py”, line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’ (C:\Users\shubh\AppData\Roaming\Python\Python39\site-packages\markupsafe_init_.py)

It seems that your installation has an incorrect version of markupsafe or jinja2. You could try upgrading/downgrading one of those, but it is difficult to say for certain without more information. Could you share your conda list and pip list?

He @shubhamjw10 could it be that you installed a package which requires markupsafe using pip? Also, could you provide pip list and conda list results?

In relation to that, here in a comment, someone in similar situation reported python3 -m pip install markupsafe==2.0.1 helped.