Python: error while I try to update pysal
Asked Answered
P

0

1

I have pysal1.4.1 installed on Python3.7.3 trough pip.

If I try to update it

sudo pip install pysal --upgrade

I get the following error

    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-fvdu1kcg/rtree/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-fvdu1kcg/rtree/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-install-fvdu1kcg/rtree/pip-egg-info
         cwd: /private/tmp/pip-install-fvdu1kcg/rtree/
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-install-fvdu1kcg/rtree/setup.py", line 3, in <module>
        import rtree
      File "/private/tmp/pip-install-fvdu1kcg/rtree/rtree/__init__.py", line 1, in <module>
        from .index import Rtree
      File "/private/tmp/pip-install-fvdu1kcg/rtree/rtree/index.py", line 6, in <module>
        from . import core
      File "/private/tmp/pip-install-fvdu1kcg/rtree/rtree/core.py", line 143, in <module>
        rt.Error_GetLastErrorNum.restype = ctypes.c_int
      File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__
        func = self.__getitem__(name)
      File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Peshawar answered 11/3, 2020 at 11:0 Comment(2)
This Error_GetLastErrorNum should come from spatialindex. If you don't have it, do install it; if installed, make sure its shared object be available (platform dependent, for Linux consult /etc/ld.so.conf)Garver
For example, on my Linux-box, nm -D /usr/lib/x86_64-linux-gnu/libspatialindex_c.so | grep 'Error_GetLastErrorNum' command returns 000000000000e550 T Error_GetLastErrorNumGarver

© 2022 - 2024 — McMap. All rights reserved.