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

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

相关推荐
梁辰兴2 小时前
计算机网络基础:网络地址转换
网络·计算机网络·计算机·nat·计算机网络基础·梁辰兴·网络地址转换协议
Q16849645153 小时前
红帽Linux-进程、ssh、网络、软件包、文件系统
linux·运维·网络
tobias.b3 小时前
408真题解析-2009-39-网络-TCP拥塞控制
网络·网络协议·tcp/ip·计算机考研·408考研·408真题解析
数通工程师3 小时前
IPv4和IPv6 地址分配:从划分到工具全解析
网络·网络协议·tcp/ip·华为
小白电脑技术4 小时前
玩客云OneCloud插入内存卡之后,开机自动挂载教程
网络·电脑
南烟斋..4 小时前
嵌入式系统(51单片机)核心外设详解:UART通信与DS18B20温度采集
linux·运维·网络
e***98574 小时前
跨平台虚拟机网络故障排查指南
运维·网络
早日退休!!!5 小时前
内存泄露(Memory Leak)核心原理与工程实践报告
大数据·网络
废墟乌托邦5 小时前
实验10 路由器的基本配置 实验报告
网络·智能路由器
初听于你5 小时前
IP地址与路由器地址
linux·运维·服务器·网络·tcp/ip·计算机网络·智能路由器