Hello all,
I just bought a new laptop with windows 10, and am having trouble running jupyter lab. Im using powershell to open and use jupyter lab.
The main issue is that it can’t start the kernel. I was looking over the powershell and looking for errors, and I found this:
" import win32api
ModuleNotFoundError: No module named ‘win32api’ "
Below is what powershell returns once I try to open jupyter and select python3 Kernel.
[W 11:25:14.790 LabApp] Terminals not available (error was No module named ‘winpty.cywinpty’)
[I 11:25:14.812 LabApp] JupyterLab extension loaded from c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyterlab
[I 11:25:14.812 LabApp] JupyterLab application directory is c:\users\lenovo\appdata\local\programs\python\python39\share\jupyter\lab
[I 11:25:14.914 LabApp] Serving notebooks from local directory: C:\Users\Lenovo
[I 11:25:14.914 LabApp] Jupyter Notebook 6.1.5 is running at:
/?token=568bb974134d3c350a34c512fb1a720c971876724bf9375a
[I 11:25:14.915 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:25:14.931 LabApp]
To access the notebook, open this file in a browser:
file:///C:/Users/Lenovo/AppData/Roaming/jupyter/runtime/nbserver-19720-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=568bb974134d3c350a34c512fb1a720c971876724bf9375a
or http://127.0.0.1:8888/?token=568bb974134d3c350a34c512fb1a720c971876724bf9375a
[W 11:25:17.648 LabApp] Could not determine jupyterlab build status without nodejs
[E 11:25:20.119 LabApp] Uncaught exception POST /api/sessions?1605522320059 (::1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:8888’, method=‘POST’, uri=’/api/sessions?1605522320059’, version=‘HTTP/1.1’, remote_ip=’::1’)
Traceback (most recent call last):
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\web.py”, line 1704, in _execute
result = await result
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\notebook-6.1.5-py3.9.egg\notebook\services\sessions\handlers.py”, line 69, in post
model = yield maybe_future(
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(exc_info) # type: ignore
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\notebook-6.1.5-py3.9.egg\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\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(exc_info) # type: ignore
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\notebook-6.1.5-py3.9.egg\notebook\services\sessions\sessionmanager.py”, line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\tornado-6.1-py3.9-win-amd64.egg\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\notebook-6.1.5-py3.9.egg\notebook\services\kernels\kernelmanager.py”, line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_client-6.1.7-py3.9.egg\jupyter_client\multikernelmanager.py”, line 185, in start_kernel
km.start_kernel(**kwargs)
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_client-6.1.7-py3.9.egg\jupyter_client\manager.py”, line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_client-6.1.7-py3.9.egg\jupyter_client\manager.py”, line 256, in pre_start_kernel
self.write_connection_file()
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_client-6.1.7-py3.9.egg\jupyter_client\connect.py”, line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_client-6.1.7-py3.9.egg\jupyter_client\connect.py”, line 138, in write_connection_file
with secure_write(fname) as f:
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\contextlib.py”, line 117, in enter
return next(self.gen)
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_core-4.7.0rc0-py3.9.egg\jupyter_core\paths.py”, line 461, in secure_write
win32_restrict_file_to_user(fname)
File “c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\jupyter_core-4.7.0rc0-py3.9.egg\jupyter_core\paths.py”, line 387, in win32_restrict_file_to_user
import win32api
ModuleNotFoundError: No module named ‘win32api’
[W 11:25:20.123 LabApp] Unhandled error
[E 11:25:20.129 LabApp] {
“Origin”: “http://localhost:8888”,
“Referer”: “http://localhost:8888/lab”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362”,
“Accept”: "/",
“Accept-Language”: “es-ES,es;q=0.5”,
“Authorization”: “token 568bb974134d3c350a34c512fb1a720c971876724bf9375a”,
“Content-Type”: “text/plain;charset=UTF-8”,
“X-Xsrftoken”: “2|ee9df712|abac607c6bd89b0a8b08c2f9d3e11790|1605516335”,
“Accept-Encoding”: “gzip, deflate”,
“Host”: “localhost:8888”,
“Content-Length”: “117”,
“Connection”: “Keep-Alive”,
“Cache-Control”: “no-cache”,
“Cookie”: "_xsrf=2|ee9df712|abac607c6bd89b0a8b08c2f9d3e11790|1605516335; username-localhost-8888=“2|1:0|10:1605522318|23:username-localhost-8888|44:MGQ1ZjMzNmQ5MTI3NDBhNjgzYWE2MWQ1MjAxMTczOGE=|e59bfa672e0eeb676424faf9ffbe2ad948589aeec5c19643d9256d4bbb0c4f35"”
}
[E 11:25:20.130 LabApp] 500 POST /api/sessions?1605522320059 (::1) 58.47ms referer=http://localhost:8888/lab
If anyone has any tips or knows what the problem is, please do tell!