Skip to content

sm2样例运行报错 #11

Open
Open

Description

@MrMuchWorse

运行时报下面的错误:FileNotFoundError: Could not find module 'C:\Program Files\GmSSL 3.1.1\bin\gmssl.dll' (or one of its dependencies). Try using the full path with constructor syntax.

在控制台能够正常import:
image

Activity

  1. KKKGod commented on Jan 10, 2024

    @KKKGod

    安装Visio stdio相关c++组件 我的这么解决的

  2. ferstar commented on Oct 18, 2025

    @ferstar

    ✅ SM2 样例 DLL 加载问题已解决

    你好!这个 Windows 平台的 DLL 加载问题已经在 PR #26 中彻底解决:
    #26

    🔧 问题根源

    之前遇到的 FileNotFoundError: Could not find module 'gmssl.dll' 错误是因为:

    1. ❌ 需要手动安装 GmSSL 并正确配置 PATH
    2. ❌ 缺少 Visual Studio C++ 运行时组件
    3. ❌ DLL 依赖文件不完整

    ✨ 现在的解决方案

    PR #26 将所有依赖打包在一起,无需任何手动配置:

    # 一行命令安装,无需配置环境变量
    pip install https://github.com/ferstar/GmSSL-Python/releases/download/v2.2.2/gmssl_python-2.2.2-py3-none-any.whl

    优势:

    • ✅ 预编译的 GmSSL 库已内置
    • ✅ 所有 DLL 依赖完整打包
    • ✅ 无需安装 Visual Studio 组件
    • ✅ 所有 SM2 样例开箱即用

    📦 测试验证

    PR #26 在 Windows 平台通过了 124 个单元测试,包括所有 SM2 相关功能。

    下载链接:https://github.com/ferstar/GmSSL-Python/releases/tag/v2.2.2

    欢迎测试反馈!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions