Python~ImportError: DLL load failed while importing win32api: 找不到指定的程序。

错误代码

ImportError: DLL load failed while importing win32api: 找不到指定的程序。

报错提示

(Just_do_it) C:\Users\14116>jupyter lab
[I 2021-09-13 10:42:13.972 ServerApp] jupyterlab | extension was successfully linked.
[W 2021-09-13 10:42:13.998 ServerApp] The 'min_open_files_limit' trait of a ServerApp instance expected an int, not the NoneType None.
[I 2021-09-13 10:42:14.499 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-09-13 10:42:14.501 LabApp] JupyterLab extension loaded from d:\anaconda3\envs\just_do_it\lib\site-packages\jupyterlab
[I 2021-09-13 10:42:14.501 LabApp] JupyterLab application directory is D:\anaconda3\envs\Just_do_it\share\jupyter\lab
[I 2021-09-13 10:42:14.505 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-09-13 10:42:14.507 ServerApp] Serving notebooks from local directory: C:\Users\14116
[I 2021-09-13 10:42:14.507 ServerApp] Jupyter Server 1.11.0 is running at:
[I 2021-09-13 10:42:14.507 ServerApp] http://localhost:8888/lab?token=4937b82c20db288e9914b9642e899c8bdeee51068f99713a
[I 2021-09-13 10:42:14.508 ServerApp]  or http://127.0.0.1:8888/lab?token=4937b82c20db288e9914b9642e899c8bdeee51068f99713a
[I 2021-09-13 10:42:14.508 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Traceback (most recent call last):
  File "d:\anaconda3\envs\just_do_it\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\anaconda3\envs\just_do_it\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\anaconda3\envs\Just_do_it\Scripts\jupyter-lab.EXE\__main__.py", line 7, in <module>
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_server\extension\application.py", line 577, in launch_instance
    serverapp.start()
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_server\serverapp.py", line 2662, in start
    self.start_app()
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_server\serverapp.py", line 2592, in start_app
    self.write_server_info_file()
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_server\serverapp.py", line 2410, in write_server_info_file
    with secure_write(self.info_file) as f:
  File "d:\anaconda3\envs\just_do_it\lib\contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_core\paths.py", line 461, in secure_write
    win32_restrict_file_to_user(fname)
  File "d:\anaconda3\envs\just_do_it\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
    import win32api
ImportError: DLL load failed while importing win32api: 找不到指定的程序。

解决方法

  1. 卸载掉原来的pywin32

    pip uninstall pywin32
    
  2. 安装新的pywin32

    pip install pywin32==225
    
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值