ImportError: сбой загрузки DLL:% 1 не является допустимым приложением Win32 - ошибка ядра в блокноте jupyter - PullRequest
0 голосов
/ 28 апреля 2020

Я обнаружил следующую ошибку ядра на ноутбуке jupyter. Эта проблема началась после установки новой версии python (3.8.2) и пакета visual studio python. Я пытался удалить и переустановить anaconda, но он все еще не работает.

 Traceback (most recent call last):
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1703, in _execute
    result = await result
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\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\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 301, in start_kernel
    kernel_cmd, kw = self.pre_start_kernel(**kw)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 248, in pre_start_kernel
    self.write_connection_file()
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 474, in write_connection_file
    kernel_name=self.kernel_name
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
    with secure_write(fname) as f:
  File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 435, in secure_write
    win32_restrict_file_to_user(fname)
  File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
    import win32api
ImportError: DLL load failed: %1 is not a valid Win32 application.

1 Ответ

0 голосов
/ 28 апреля 2020

Я решил проблему с выполнением следующего кода: pip install -- pywin32==227

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...