Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hook-rtree.py: libspatialindex is either not installed ... #654

Closed
jdegenstein opened this issue Oct 20, 2023 · 2 comments · Fixed by #657
Closed

hook-rtree.py: libspatialindex is either not installed ... #654

jdegenstein opened this issue Oct 20, 2023 · 2 comments · Fixed by #657
Labels
state:triage We're still figuring out how severe this issue is

Comments

@jdegenstein
Copy link

Describe the bug
New release of Rtree == 1.1.0 revised the way their libraries are stored on Linux see issue: Toblerity/rtree#270

  • Which hook/library isn't working?
    hook-rtree.py

  • Does the error get raised while building or when running?
    While Building

Error:

2023-10-20T19:06:02.8400513Z 39099 INFO: Loading module hook 'hook-rtree.py' from '/home/runner/micromamba/envs/test/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
2023-10-20T19:06:02.8406350Z Traceback (most recent call last):
2023-10-20T19:06:02.8408557Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/depend/imphook.py", line 383, in _load_hook_module
2023-10-20T19:06:02.8410506Z     self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
2023-10-20T19:06:02.8412824Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/compat.py", line 626, in importlib_load_source
2023-10-20T19:06:02.8414421Z     return mod_loader.load_module()
2023-10-20T19:06:02.8415675Z   File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
2023-10-20T19:06:02.8416966Z   File "<frozen importlib._bootstrap_external>", line 1063, in load_module
2023-10-20T19:06:02.8418421Z   File "<frozen importlib._bootstrap_external>", line 888, in load_module
2023-10-20T19:06:02.8419628Z   File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
2023-10-20T19:06:02.8420938Z   File "<frozen importlib._bootstrap>", line 719, in _load
2023-10-20T19:06:02.8422027Z   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
2023-10-20T19:06:02.8423425Z   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
2023-10-20T19:06:02.8424661Z   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-10-20T19:06:02.8427514Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-rtree.py", line 18, in <module>
2023-10-20T19:06:02.8429948Z     binaries = conda.collect_dynamic_libs('libspatialindex', dest='rtree/lib', dependencies=False)
2023-10-20T19:06:02.8431992Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/utils/hooks/conda.py", line 309, in collect_dynamic_libs
2023-10-20T19:06:02.8433532Z     for file in files(name, dependencies, excludes):
2023-10-20T19:06:02.8435089Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/utils/hooks/conda.py", line 279, in files
2023-10-20T19:06:02.8436846Z     return [file for dist in _iter_distributions(name, dependencies, excludes) for file in dist.files]
2023-10-20T19:06:02.8438891Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/utils/hooks/conda.py", line 241, in _iter_distributions
2023-10-20T19:06:02.8440340Z     return [Distribution.from_name(name)]
2023-10-20T19:06:02.8441871Z   File "/home/runner/micromamba/envs/test/lib/python3.10/site-packages/PyInstaller/utils/hooks/conda.py", line 146, in from_name
2023-10-20T19:06:02.8443222Z     raise ModuleNotFoundError(
2023-10-20T19:06:02.8444287Z ModuleNotFoundError: Distribution libspatialindex is either not installed or was not installed using Conda.
2023-10-20T19:06:02.8445235Z 
2023-10-20T19:06:02.8445734Z During handling of the above exception, another exception occurred:

Desktop (please complete the following information):

  • OS: Ubuntu-20.04 (GitHub Action Runner)
  • Python Version: 3.10
  • Version of pyinstaller-hooks-contrib: 2023.1
  • Version of PyInstaller: 6.1.0
@jdegenstein jdegenstein added the state:triage We're still figuring out how severe this issue is label Oct 20, 2023
@rokm
Copy link
Member

rokm commented Oct 20, 2023

So this is pip-installed rtree in Anaconda-based python?

@jdegenstein
Copy link
Author

Yes it is a pip installed rtree in a conda env, please see the attached full build log for further info.

failing GH Action build 118 linux.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:triage We're still figuring out how severe this issue is
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants