Skip to content

ImportError: DLL load failed while importing _rust : The specified module could not be found #3425

Closed
@CoderYunTang

Description

@CoderYunTang

Bug Description

Python::with_gil(|py|
{
let ts = py.import("cryptography.hazmat.bindings._rust");
if let Err(err) = ts {
println!("{}", err);
}
}

ImportError: DLL load failed while importing _rust : The specified module could not be found

Importing with the python interpreter is no problem:
image

Steps to Reproduce

  1. python3.11.5
  2. windows 10
  3. py.import("cryptography.hazmat.bindings._rust");
  4. ImportError: DLL load failed while importing _rust : The specified module could not be found

Backtrace

No response

Your operating system and version

Windows 10

Your Python version (python --version)

python 3.11.5

Your Rust version (rustc --version)

rustc 1.70.0

Your PyO3 version

0.19.2

How did you install python? Did you use a virtualenv?

https://www.python.org/

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions