问题解决在后面!!!!
安装
-
Vscode 和 Anaconda 自行百度安装, -
在 Vscode中 安装 Python 插件 -
创建 .ipynb 后缀的文件 -
操作 与 网页版 jupyter notebook 相似
报错内容:
Kernel died with exit code 1. D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '70f91ecb-d1b9-4e6f-bab4-f4eb00d14e8c' instead of 'b"70f91ecb-d1b9-4e6f-bab4-f4eb00d14e8c"'. warn( Traceback (most recent call last): File "D:\IDE\Anaconda3\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\IDE\Anaconda3\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel_launcher.py", line 16, in <module> app.launch_new_instance() File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\config\application.py", line 844, in launch_instance app.initialize(argv) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\config\application.py", line 87, in inner return method(app, *args, **kwargs) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel\kernelapp.py", line 570, in initialize self.write_connection_file() File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel\kernelapp.py", line 230, in write_connection_file write_connection_file(cf, ip=self.ip, key=self.session.key, transport=self.transport, File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file with secure_write(fname) as f: File "D:\IDE\Anaconda3\envs\pytorch\lib\contextlib.py", line 113, in __enter__ return next(self.gen) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 100, in secure_write win32_restrict_file_to_user(fname) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 53, in win32_restrict_file_to_user import win32api ImportError: DLL load failed while importing win32api: 找不到指定的程序。
解决方法:
pip install pywin32==228
|