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

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

相关推荐
txzz888816 分钟前
CentOS-Stream-10 系统安装之网络设置
linux·运维·服务器·网络·计算机网络·centos
老蒋新思维1 小时前
创客匠人峰会新解:AI 时代知识变现的 “信任分层” 法则 —— 从流量到高客单的进阶密码
大数据·网络·人工智能·tcp/ip·重构·创始人ip·创客匠人
Cat God 0072 小时前
FTP、FTPS 和 SFTP 的区别
网络
雪域迷影2 小时前
Windows11中使用VS2022编译运行libevent网络库
网络·github·cmake·visual studio·libevent
遇见火星2 小时前
常见Nmap语句
网络·nmap
网络研究院3 小时前
英国对LastPass处以120万英镑罚款,原因是其在2022年发生数据泄露事件,影响了160万用户
网络·安全·数据·泄露·用户
小明的小名叫小明3 小时前
Go从入门到精通(28) -再谈GMP和starvation
网络·golang
元气满满-樱3 小时前
docker网络模式详解
网络·docker·容器
夜来小雨3 小时前
华为防火墙特征库无法升级
网络
盼哥PyAI实验室4 小时前
12306反反爬虫策略:Python网络请求优化实战
网络·爬虫·python