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

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

相关推荐
米高梅狮子3 小时前
03.网络类服务实践
linux·运维·服务器·网络·kubernetes·centos·openstack
June`4 小时前
网络编程时内核究竟做了什么???
linux·服务器·网络
原来是猿4 小时前
腾讯云服务器端口开放完全指南
服务器·网络·腾讯云
你的保护色4 小时前
【无标题】
java·服务器·网络
楼兰公子4 小时前
RK3588 + Linux7.0.3 网络工程调试错误速查手册
linux·网络·3588
IpdataCloud5 小时前
稳定的企业级IP数据接口怎么选?可用性指标+离线库高可用方案
运维·网络·tcp/ip
HMS工业网络5 小时前
如何解决使用TwinCAT时EtherCAT网络出现“Sync Manager Watchdog”报错
网络·网络协议·网络安全
w1wi9 小时前
安卓抓包完全指南(一):从入门到 SSL Pinning 绕过
android·网络协议·ssl
逸巽散人10 小时前
【无标题】
网络
kaoa00010 小时前
Linux入门攻坚——77、虚拟化技术基础原理-2
linux·服务器·网络