Skip to content

Commit 9719d9f

Browse files
authored
[Compile] Support py38&py39 (#7677) (#7687)
1 parent 6e214ee commit 9719d9f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lite/api/python/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
if os.name =='nt':
1919
current_path = os.path.abspath(os.path.dirname(__file__))
2020
third_lib_path = current_path + os.sep + 'libs'
21-
os.environ['path'] = third_lib_path+ ';' + os.environ['path']
22-
sys.path.insert(0, third_lib_path)
21+
try:
22+
os.add_dll_directory(third_lib_path)
23+
except AttributeError:
24+
os.environ['path'] = third_lib_path+ ';' + os.environ['path']
25+
sys.path.insert(0, third_lib_path)

0 commit comments

Comments
 (0)