From 5acb38eabd3a2e9daf8ba4fe95be0e3da85bd84e Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 22 Jun 2022 00:36:03 -0700 Subject: [PATCH] fix dll loading path on Windows with Python 3.10 --- python/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/__init__.py b/python/__init__.py index ed61a320..f4492ce8 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -6,7 +6,8 @@ _netgen_bin_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..',con _netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..',config.NETGEN_PYTHON_RPATH)) if sys.platform.startswith('win'): - if sys.version >= '3.8': + v = sys.version_info + if v.major == 3 and v.minor >= 8: os.add_dll_directory(_netgen_bin_dir) else: os.environ['PATH'] += ';'+_netgen_bin_dir