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

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

相关推荐
I · T · LUCKYBOOM9 小时前
iptables防火墙
linux·运维·服务器·网络·安全
_Orch1d10 小时前
详解SSL/TLS协议握手协议、记录层协议与警报协议
网络·计算机网络·安全·密码学·ssl·身份认证·对称加密
chenyuhao202411 小时前
Linux网络编程:HTTP协议
linux·服务器·网络·c++·后端·http·https
duration~11 小时前
IPv6 详解
网络·网络协议·ip
广东大榕树信息科技有限公司11 小时前
动环监控如何有效提升机房环境管理的可靠性与响应速度?
运维·网络·物联网·国产动环监控系统·动环监控系统
zhengfei61113 小时前
【POC漏洞】XXX网上阅卷系统 monitor 未授权访问
网络·安全·web安全
福尔摩斯张14 小时前
Linux的pthread_self函数详解:多线程编程中的身份标识器(超详细)
linux·运维·服务器·网络·网络协议·tcp/ip·php
ArrebolJiuZhou14 小时前
02arm指令集(一)——LDR,MOV,STR的使用
linux·网络·单片机
一只旭宝14 小时前
Linux专题八:生产者消费者,读写者模型以及网络编程
linux·网络
代码游侠14 小时前
复习——网络基础知识
网络·笔记·网络协议·算法·http