I am using Window 10 64bit to create exe. However, the exe gives error below: File "rtree\core.py", line 126, in OSError: could not find or load spatialindex_c-64.dll [23324] Failed to execute script microwave_python_code
I tried below solutions ppl shared but still cannot solve the problem.
- --add-data=C:\path\to\spatialindex_c-64.dll;. to my build command
- pip uninstall rtree then install using 'Rtree-0.9.4-cp37-none-win_amd64.whl'
- install 'spatialindex-src-1.9.3.tar.gz'
- copied the 'spatialindex_c-64.dll' into rtee site package folder
- copied the 'spatialindex_c-64.dll' into exe folder
Anyone able to create working exe by doing above? I still face problem after trying above solutions. Anything else that I can do to get my exe works?
I had the same issue, and I solved it using the final answer on http://pyinstaller.47505.x6.nabble.com/OSError-while-running-exe-td2997.html.
To solve it, find the
.specsfile that is made when building the .exe, and add two things to it:That will find the
.dllfiles used byrtree. After that, you can rebuild it with the commandpyinstaller your_script_name.spec.