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

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

相关推荐
AI 小老六3 小时前
Agent 工程化新底座:用 CLI 契约层打通 HTTP 接口与业务能力
网络·人工智能·http·ai·架构
CoreTK芯通康EMC整改3 小时前
2026 华南 EMI 整改服务商推荐
网络·经验分享·emc整改案例·emc整改
cft56200_ln4 小时前
gPTP Master 报文目的 MAC 地址
运维·服务器·网络
星恒讯工业路由器4 小时前
配网自动化多网融合方案
网络·物联网·信息与通信·工业路由器·多网融合·配网自动化·双模路由器
咖啡有点酷5 小时前
Geo-Targeting 技术深度解析:IP定位与本地化投放实践
网络·技术分享
VidDown5 小时前
在线视频下载器技术解析:原理、工具与合规实践
网络·音视频·实时音视频·视频编解码·视频下载
努力努力再努力wz5 小时前
【高性能网络库与HTTP Server系列】:基于主从 Reactor 模型实现高性能 C++ 网络库与 HTTP Server
开发语言·网络·数据结构·数据库·c++·网络协议·http
Mr.HeBoYan6 小时前
DPDK为什么越来越少使用rte_ring?——从Lock-Free到Run-to-Completion,重新理解现代DPDK架构演进(上)
linux·网络·算法·性能优化·架构·dpdk
z小猫不吃鱼6 小时前
06 权重幅值剪枝、剪枝后微调与稀疏网络训练:模型剪枝中的三个基本问题
网络·算法·剪枝