ImportError: DLL load failed while importing _ssl: 找不到指定的模块的解决方法

ImportError: DLL load failed while importing _ssl: 找不到指定的模块的解决方法

现象

在命令行中,可以正常导入_ssl模块,如下:

bash 复制代码
Python 3.9.0 (default, Nov 15 2020, 08:30:55) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ssl
>>>

但是在Jupyter notebook中无法导入,报错:ImportError: DLL load failed while importing _ssl: 找不到指定的模块 如下:

bash 复制代码
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 import _ssl

ImportError: DLL load failed while importing _ssl: 找不到指定的模块。

解决办法

配置系统环境变量,在path中新增如下内容:

新增之后,重启Jupyter Notebok即可,再次导入便可解决问题了。

注意:如果创建了多个虚拟环境,找到对应的虚拟环境目录进行替换。

相关推荐
zmzmzmalo3 小时前
Linux ELF文件加载与内存管理揭秘
linux·网络·数据库
三言老师9 小时前
K8s集群运行时自动化运维全覆盖落地实操(下)
linux·运维·服务器·网络
80s77710 小时前
住宅代理解析:动态住宅IP与静态住宅IP如何选型?
网络·网络协议·tcp/ip
吴声子夜歌11 小时前
网络安全——网络渗透测试(网络扫描)
网络·web安全·php
fish-man11 小时前
ceshi ceshi yixia
网络·安全·web安全
anxiao_m11 小时前
2026制造业云桌面选型攻略,不同生产场景适配方案汇总
大数据·网络·数据库
吹什么轩12 小时前
linux网络:TCP套接字基础
linux·网络·tcp/ip
志栋智能13 小时前
安全超自动化:构建全方位安全可观测性的基础
网络·安全·自动化
mqiqe14 小时前
线程调度与 Schedulers:Project Reactor 并发模型的核心引擎
java·开发语言·网络
略略略咯咯14 小时前
网络协议-study
网络·网络协议