Skip to content

Commit

Permalink
modify the PATH to give precedence to the pyinstaller dll directory. n…
Browse files Browse the repository at this point in the history
  • Loading branch information
davemfish committed Dec 3, 2024
1 parent 7c1a196 commit 008f352
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions exe/hooks/rthook.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@
# sys._MEIPASS is the path to where the pyinstaller entrypoint bundle
# lives. See the pyinstaller docs for more details.
os.environ['SPATIALINDEX_C_LIBRARY'] = sys._MEIPASS

if platform.system() == 'Windows':
# sys._MEIPASS contains gdal DLLs. It does not otherwise end
# up on the PATH, which means that gdal can discover
# incompatible DLLs from some other place on the PATH, such
# as an anaconda gdal installation.
os.environ['PATH'] = f"{sys._MEIPASS};{os.environ['PATH']}"

0 comments on commit 008f352

Please sign in to comment.