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

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

相关推荐
S&Z346341 分钟前
[官方IP] Shift RAM
网络协议·tcp/ip·fpga开发
小吃饱了44 分钟前
LSA六种类型
网络·智能路由器
游王子1 小时前
springboot3 声明式 HTTP 接口
网络·spring boot·网络协议·http
神经毒素2 小时前
WEB安全--RCE--webshell bypass
网络·安全·web安全
猿周LV2 小时前
网络原理 - 应用层, 传输层(UDP 和 TCP) 进阶, 网络层, 数据链路层 [Java EE]
服务器·网络·网络协议·tcp/ip·udp·java-ee
Zz_waiting.2 小时前
网络原理 - 9
linux·服务器·网络·网络协议·tcp/ip
娃娃略2 小时前
【AI模型学习】双流网络——更强大的网络设计
网络·人工智能·pytorch·python·神经网络·学习
你又食言了哦2 小时前
linux下使用wireshark捕捉snmp报文
linux·网络·wireshark
_揽3 小时前
前端开发本地配置 HTTPS 全面详细教程
网络协议·http·https
S&Z34633 小时前
[FPGA Video IP] Video Processing Subsystem
网络协议·tcp/ip·fpga开发·video