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即可,再次导入便可解决问题了。

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

相关推荐
Bobolink_1 小时前
手机端和电脑端的网络环境配置有什么不同?
网络·智能手机·电脑·网络环境
星恒讯工业路由器2 小时前
三大工业以太网协议选型对比
网络·物联网·ethercat·profinet·ethernet/ip·工业以太网协议
春卷同学2 小时前
HarmonyOS掌上记账APP开发实践第25篇:Image 组件高级用法 — 资源引用、网络图片与首字符占位方案
网络·华为·harmonyos
mounter6252 小时前
从内存隔离到运行时防线:透视 Linux 内核安全强化的博弈与演进
linux·网络·安全·linux kernel·kernel
Bug退散师4 小时前
多路IO复用[select版TCP服务器与poll版TCP服务器]与常用网络编程函数详解
linux·服务器·c语言·网络·驱动开发·tcp/ip
Acrellea6 小时前
固态变压器(SST)热管理破局:安科瑞交直流专属测温方案护航无人值守运维
运维·网络
振浩微433射频芯片6 小时前
5个IO控制20个LED?查理复用实战拆解
网络·单片机·物联网·学习·智能家居
rcms152702692186 小时前
IS200TREAH2A 终端板
网络
小邓的技术笔记6 小时前
解析 gin 接收到 http 请求是怎么处理的
网络协议·http·gin
TlSfoward7 小时前
TLSFOWARD抓包工具 TLS指纹
网络协议·http·百度·https