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

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

相关推荐
车载测试工程师7 分钟前
CAPL学习-AVB交互层-概述
网络协议·tcp/ip·以太网·capl·canoe
虹科网络安全27 分钟前
艾体宝洞察 | 利用“隐形字符”的钓鱼邮件:传统防御为何失效,AI安全意识培训如何补上最后一道防线
运维·网络·安全
石像鬼₧魂石1 小时前
Kali Linux 网络端口深度扫描
linux·运维·网络
鲸鱼电台分台2 小时前
工业应用通信协议:IEC104
网络协议
适应规律2 小时前
UNeXt-Stripe网络架构解释
网络
纸带4 小时前
USB通信的状态
网络
无敌最俊朗@4 小时前
WebSocket与Webhook:实时通信技术对比
网络·websocket·网络协议
悟空空心5 小时前
服务器长ping,traceroute
linux·服务器·网络·ssh·ip·ping++
F133168929575 小时前
5030A 芯片 24V 转 5V 15A 大电流快充选型
网络·单片机·嵌入式硬件·物联网·汽车
2301_773730316 小时前
系统编程—IPC进程间通信
网络·网络协议