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

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

相关推荐
寰天柚子4 小时前
裸金属服务器深度解析:适用场景、选型指南与运维实践
服务器·网络·github
GTgiantech4 小时前
精准成本控制与单向通信优化:1X9、SFP单收/单发光模块专业解析
运维·网络
Suchadar4 小时前
ACL访问控制列表协议
网络·智能路由器
广东大榕树信息科技有限公司6 小时前
如何通过国产信创动环监控系统优化工厂环境管理?
运维·网络·物联网·国产动环监控系统·动环监控系统
工控小楠6 小时前
EtherNET IP转Profinet协议网关在智能仓储系统中的应用
服务器·网络·tcp/ip
heartbeat..7 小时前
JUC 在实际业务场景的落地实践
java·开发语言·网络·集合·并发
gugugu.8 小时前
Redis ZSet类型深度解析:有序集合的原理与实战应用
网络·windows·redis
车载测试工程师10 小时前
CAPL学习-AVB交互层-功能函数-通用函数
网络·tcp/ip·以太网·capl·canoe
元气满满-樱11 小时前
DHCP服务部署
网络