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

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

相关推荐
夜月yeyue26 分钟前
AUTOSAR CP 从上电到 Runnable
c语言·网络·tcp/ip·车载系统
lsh曙光36 分钟前
延时at指令和定时cron指令
linux·服务器·网络
treesforest38 分钟前
IP定位技术在网络犯罪侦查中的应用与价值
网络·网络协议·tcp/ip·网络安全·ip归属地查询·反欺诈
外滩运维专家1 小时前
HTTPS 证书报错排查手册:6 个高频错误码及解决方法
网络协议·http·https
XR1234567881 小时前
企业全光网络架构选型技术白皮书:从物理层到运维层的全链路分析
运维·网络·架构
起司喵喵2 小时前
通过Certbot自动申请更新HTTPS网站的SSL证书
网络协议·https·ssl
萧瑟余晖2 小时前
Java深入解析篇九之NIO详解
java·网络·nio
小王C语言3 小时前
【7. 实现登录注册模块】:实现会话管理、注册/登录/退出 API
网络·c++
泡沫冰@3 小时前
ECS 的介绍和使用
linux·服务器·网络
笨鸟先飞,勤能补拙3 小时前
AI 赋能网络安全领域深度剖析
网络·人工智能·windows·安全·web安全·网络安全·github