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

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

相关推荐
严谨的麻辣烫8 小时前
数据中心出口与住宅出口的技术差异:从 ASN 到 TCP 行为的一次拆解
网络·网络协议·tcp/ip
Freed&8 小时前
Zabbix TCP连接状态自定义监控完整部署手册
网络·tcp/ip·zabbix
学着改变2758 小时前
手持式超声波流量计为何首选行澳科技?便携巡检与外夹计量的性能标杆
大数据·网络·人工智能·科技·产品运营·量子计算
2501_915921439 小时前
抓包鹰 Traceeagle 解除证书绑定,SSL Pinning 解除
网络·网络协议·网络安全·ios·adb·https·ssl
Lucky_Turtle10 小时前
【SSL】letsencrypt域名证书申请,Cloudflare域名
网络·网络协议·ssl
路由侠内网穿透10 小时前
本地部署企业级快速开发平台芋道管理后台并实现外部访问
运维·服务器·网络·网络协议
basketball61610 小时前
软考中级网络工程师 第4章 无线通信网 备考总结
linux·服务器·网络·网络工程师·软考
睡一觉就好了。12 小时前
Linux 信号机制
linux·运维·网络
冠希陈、13 小时前
Nginx部署SSL,导致多站点串站问题
运维·nginx·ssl
A_humble_scholar15 小时前
Linux(二) C++ TCP/UDP网络编程
linux·网络·c++