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

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

相关推荐
W.W.H.27 分钟前
嵌入式常见的面试题1
linux·网络·经验分享·网络协议·tcp/ip
zmj32032434 分钟前
CAN + 以太网 + Wi-Fi + BLE + TCP/IP + MQTT +HTTP协议层级
网络·网络协议·tcp/ip
HXQ_晴天1 小时前
Linux 系统的交互式进程监控工具htop
linux·服务器·网络
南湖北漠1 小时前
记录生活中的那些小事(佚名)
网络·人工智能·计算机网络·其他·安全·生活
M158227690551 小时前
免编程・全兼容|SG‑PLC‑Private PLC 数据采集网关 —— 打通设备数据最后一公里
网络
发光小北1 小时前
IEC103 转 ModbusTCP 网关应用在什么场景?
网络·网络协议
FS_Marking1 小时前
ZTP(零接触配置):实现自动化与高效的网络部署
运维·网络·自动化
仗剑天涯 回首枉然2 小时前
wifi 8 features
网络
上海合宙LuatOS2 小时前
LuatOS扩展库API——【exremotecam】网络摄像头控制
开发语言·网络·物联网·lua·luatos
哼?~2 小时前
Socket编程准备
linux·网络