I am using python 3.9 with anaconda, in a custom environment. The fact that I am using an older version of python is to have tensorflow-2.5.3 and tensorflow-gpu-2.10.0 and tensorflow-io-0.18.0 be compatible with my cuda enabled Nvidia GTX-1060. I always run Jupyter lab by first going into anaconda prompt and activationg my virtual environment and then typing "Jupyter lab". Last time, everything ran perfectly, but while I ran a notebook cell with the code line"data = data.map(preprocess)", I received an error. I will provide the error shortly.
I closed all windows and restarted my windows 10 pro 22h2 x64 and tried to open Jypyter. the environment activated successfully, but when I typed "jupyter lab", I got the exact same error, which is: (gpu_env) C:\Users\shahr>jupyter lab Traceback (most recent call last): File "C:\Users\shahr.conda\envs\gpu_env\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Users\shahr.conda\envs\gpu_env\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\shahr.conda\envs\gpu_env\Scripts\jupyter-lab.EXE_main.py", line 4, in File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyterlab_init.py", line 8, in from .handlers.announcements import ( File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyterlab\handlers\announcements.py", line 15, in from jupyterlab_server.translation_utils import translator File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyterlab_server_init.py", line 6, in from .app import LabServerApp File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyterlab_server\app.py", line 10, in from jupyter_server.extension.application import ExtensionApp, ExtensionAppJinjaMixin File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyter_server\extension\application.py", line 16, in from jupyter_server.serverapp import ServerApp File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyter_server\serverapp.py", line 104, in from jupyter_server.services.contents.filemanager import ( File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\jupyter_server\services\contents\filemanager.py", line 21, in from anyio.to_thread import run_sync File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\anyio_init_.py", line 5, in from ._core._eventloop import current_time as current_time File "C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\anyio_core_eventloop.py", line 16, in from typing_extensions import TypeVarTuple, Unpack ImportError: cannot import name 'TypeVarTuple' from 'typing_extensions' (C:\Users\shahr.conda\envs\gpu_env\lib\site-packages\typing_extensions.py)
Thanks in advance
I also faced the same issue, and solved the issue by simply re-installing the Python package
jupyterlab:But since you are using Conda, you could reinstall Jupyter Lab in Conda using the following:
References