The following error was reported when I tried to open Jupyter Lab a few days ago:

Error Starting Kernel Invalid response: 500 Internal Server Error Unhandled Error Traceback (most recent call last): File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\web.py", line 1703, in _execute result = await result File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\notebook\services\sessions\handlers.py", line 69, in post model = yield maybe_future( File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 735, in run value = future.result() File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\notebook\services\sessions\sessionmanager.py ", line 88, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 735, in run value = future.result() File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\notebook\services\sessions\sessionmanager.py ", line 100, in start_kernel_for_session kernel_id = yield maybe_future( File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 735, in run value = future.result() File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\notebook\services\kernels\kernelmanager.py",  line 168, in start_kernel super(MappingKernelManager, self).start_kernel(**kwargs) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel km.start_kernel(**kwargs) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_client\manager.py", line 304, in start_kernel kernel_cmd, kw = self.pre_start_kernel(**kw) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_client\manager.py", line 251, in pre_start_kernel self.write_connection_file() File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_client\connect.py", line 468, in write_connection_file self.connection_file, cfg = write_connection_file(self.connection_file, File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_client\connect.py", line 138, in write_connection_file with secure_write(fname) as f: File "c:\users\administrator\anaconda3\envs\communitydetection\lib\contextlib.py", line 113, in __enter__ return next(self.gen) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_core\paths.py", line 435, in secure_write win32_restrict_file_to_user(fname) File "c:\users\administrator\anaconda3\envs\communitydetection\lib\site-packages\jupyter_core\paths.py", line 361, In Win32_restrict_file_to_user import Win32API ImportError: DLL load failed while Importing Win32API: failed to find the specified modules.Copy the code

On the Internet to find a lot of solutions, no solution, first hang not to mention…

Today, I need to use jupyter lab, and then Google solutions, finally found a feasible way for their own 🙂

Solutions:

  1. Uninstall PyWin32 (originally installed 228)
  2. Pywin32 ==225: PIP install PyWin32 ==225

Reference:

  1. Stackoverflow.com/questions/5…