欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 建筑 > ImportError: DLL load failed while importing _rust: 找不到指定的模块。

ImportError: DLL load failed while importing _rust: 找不到指定的模块。

2024/10/24 5:01:14 来源:https://blog.csdn.net/WMX843230304WMX/article/details/143093674  浏览:    关键词:ImportError: DLL load failed while importing _rust: 找不到指定的模块。

ImportError: DLL load failed while importing _rust: 找不到指定的模块。

安装qwen-agent 过程需要安装 cryptography

报错 :
177 WARNING: Failed to collect submodules for ‘cryptography.hazmat.backends.openssl’ because importing ‘cryptography.hazmat.backends.openssl’ raised: ImportError: DLL load failed while importing _rust: 找不到指定的模块。
14542 WARNING: hook-cryptography: failed to determine whether cryptography is using OpenSSL >= 3.0.0

系统:
os : win11
cpu : snapdragon 8cx gen3 , arm64
python :3.12.7

cryptography 报错

依赖 OpenSSL >= 3.0.0
我这里下载 openssl-3.3.2 编译成 win11 arm64 ,安装到路径C:\Programs\OpenSSL-3.3.2

配置环境变量

OPENSSL_DIR=C:\Programs\OpenSSL-3.3.2
LIB=C:\Programs\OpenSSL-3.3.2\lib
INCLUDE=C:\Programs\OpenSSL-3.3.2\include
Path=C:\Programs\OpenSSL-3.3.2\bin

然后清理之前 pip 编译的缓存:

PS C:\Users\966> pip cache info
(pip v23.3+): c:\users\966\appdata\local\pip\cachePS C:\Users\966> rm c:\users\966\appdata\local\pip\cache

重新安装:

pip install cryptography==42

查看效果

(venv) PS C:\workspace> pip list |findstr crypt
cryptography              42.0.0
(venv) PS C:\workspace> pip list | findstr qwen
qwen-agent                0.0.10

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com