Skip to content

Commit 73ca1ad

Browse files
committed
🔧 properly set Windows DLL path
Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
1 parent 8b1b2f5 commit 73ca1ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/mqt/core/__init__.py

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
from __future__ import annotations
44

5+
import sys
6+
7+
# under Windows, make sure to add the appropriate DLL directory to the PATH
8+
if sys.platform == "win32":
9+
import os
10+
import sysconfig
11+
from pathlib import Path
12+
13+
bin_dir = Path(sysconfig.get_paths()["purelib"]) / "mqt" / "core" / "bin"
14+
os.add_dll_directory(str(bin_dir))
15+
516
from ._core import Permutation, QuantumComputation
617
from ._version import version as __version__
718
from ._version import version_tuple as version_info

0 commit comments

Comments
 (0)