[Win Python HanPL][解决报错]DLL load failed while importing _ssl

问题描述:

初次运行时报以下错误:

...
File "D:\Workspace\Python\mcrm-Langchain\venv_38\lib\site-packages\pyhanlp\__init__.py", line 149, in <module>
  _start_jvm_for_hanlp()
File "D:\Workspace\Python\mcrm-Langchain\venv_38\lib\site-packages\pyhanlp\__init__.py", line 41, in _start_jvm_for_hanlp
  from pyhanlp.static import STATIC_ROOT, hanlp_installed_data_version, HANLP_DATA_PATH
File "D:\Workspace\Python\mcrm-Langchain\venv_38\lib\site-packages\pyhanlp\static\__init__.py", line 285, in <module>
  install_hanlp_jar()
File "D:\Workspace\Python\mcrm-Langchain\venv_38\lib\site-packages\pyhanlp\static\__init__.py", line 160, in install_hanlp_jar
  jar_version, jar_url, data_version, data_url = hanlp_latest_version()
...
ImportError: DLL load failed while importing _ssl: 找不到指定的模块

问题分析:

参考文档中内容:

自然语言处理学习笔记(三)————HanLP安装与使用_阿波拉的博客-CSDN博客

分析应该是下载jar时报错。


问题处理:

参考下面的内容,手动安装【OpenSSL on Windows】后解决问题:

None of the above worked for me, but instead it was a problem with OpenSSL on Windows 10 Enterprise. I fixed it by downloading and installing OpenSSL from here: Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions

Python 3.7 anaconda environment - import _ssl DLL load fail error - Stack Overflow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值