spyder启动内核时出错
An error ocurred while starting the kernel in spyder
我在 anaconda 命令提示符中 运行 这两个 pip 代码:--user pip install azureml-explain-model
和 --user pip install azureml-interpret
然后出现此错误。
错误是:
Traceback (most recent call last):
File "C:\Users\risha\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1568, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle,
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 286, in pre_start_kernel
self.write_connection_file()
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 136, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\risha\anaconda3\lib\contextlib.py", line 113, in __enter__
return next(self.gen)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
请帮帮我!!
要解决此 import win32api ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
错误,请尝试以下方法:
- 如果您正在使用
Python 3.8
,请使用 pip
: 升级 pywin32
pip install --upgrade pywin32==225
或
- 安装
pywin32
使用 conda
:
conda install pywin32
安装 pywin32
后,确保 运行 post 安装脚本位于特定 Python 位置:
python [environment path]/Scripts/pywin32_postinstall.py -install
参考文献:Getting kernel error while trying to open Jupyter notebook or Spyder, and Kernel error win32api
我在 anaconda 命令提示符中 运行 这两个 pip 代码:--user pip install azureml-explain-model
和 --user pip install azureml-interpret
然后出现此错误。
错误是:
Traceback (most recent call last):
File "C:\Users\risha\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1568, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle,
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 286, in pre_start_kernel
self.write_connection_file()
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 136, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\risha\anaconda3\lib\contextlib.py", line 113, in __enter__
return next(self.gen)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\risha\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
请帮帮我!!
要解决此 import win32api ImportError: DLL load failed while importing win32api: The specified procedure could not be found.
错误,请尝试以下方法:
- 如果您正在使用
Python 3.8
,请使用pip
: 升级
pywin32
pip install --upgrade pywin32==225
或
- 安装
pywin32
使用conda
:
conda install pywin32
安装 pywin32
后,确保 运行 post 安装脚本位于特定 Python 位置:
python [environment path]/Scripts/pywin32_postinstall.py -install
参考文献:Getting kernel error while trying to open Jupyter notebook or Spyder,