Python 3.x ImportError:DLL加载失败:%1不是有效的Win32应用程序-jupyter笔记本上的内核错误

Python 3.x ImportError:DLL加载失败:%1不是有效的Win32应用程序-jupyter笔记本上的内核错误,python-3.x,jupyter-notebook,Python 3.x,Jupyter Notebook,我在jupyter笔记本上遇到以下内核错误。这个问题是在安装了新版本的python(3.8.2)和VisualStudioPython包之后出现的。我试图卸载并重新安装anaconda,但它仍然无法工作 Traceback (most recent call last): File "C:\Users\Tolga\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1703, in _execute

我在jupyter笔记本上遇到以下内核错误。这个问题是在安装了新版本的python(3.8.2)和VisualStudioPython包之后出现的。我试图卸载并重新安装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.

我已经解决了执行以下代码的问题:
pip安装--pywin32==227