Python: error while I try to update pysal

本小妞迷上赌 提交于 2020-06-01 05:18:20

问题


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.

来源:https://stackoverflow.com/questions/60634470/python-error-while-i-try-to-update-pysal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!