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

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

相关推荐
朝风工作室31 分钟前
开源一款轻量级跨网段 IPC 设备发现与网络配置工具
网络·开源
Qaz555666911 小时前
透明DNS选路实验
网络
haluhalu.2 小时前
Linux网络编程------网络基础
网络·网络协议
坐怀不乱杯魂2 小时前
Linux网络 - HTTP协议
网络·网络协议·http
ipooipoo11883 小时前
动态住宅IP的定义、核心优势与技术场景应用
网络·网络协议·tcp/ip
祁鱼鱼鱼鱼鱼4 小时前
Keepalived实验环境设定
linux·服务器·网络
滴水之功4 小时前
OpenWrt的WAN和LAN的切换
linux·网络·openwrt
莹莹学编程—成长记5 小时前
预备知识socket
网络
winfreedoms5 小时前
java-网络编程——黑马程序员学习笔记
java·网络·学习
零基础的修炼5 小时前
Linux网络---网络层
运维·服务器·网络