zoso95 / plotter_guides

Some small tutorials to help people make plotter art
MIT License
46 stars 34 forks source link

Installing rtree `symbol not found` error #1

Open Lia-C opened 4 years ago

Lia-C commented 4 years ago

Hi, I ran the pip command to install the dependencies but got an error with the installation of rtree. The error was a AttributeError: dlsym(RTLD_DEFAULT, Error_GetLastErrorNum): symbol not found error. Here's my full output:

liacole@Lias-MacBook-Pro:~/Documents/plotter_guides/genhut$ pip3 install -r ./requirements.txt
Collecting jupyterlab
  Downloading https://files.pythonhosted.org/packages/36/d6/9e6a8a04f4fc337fbc05065d1ba4ba3460a09ee41355410bcd6d8be8841a/jupyterlab-2.0.1-py3-none-any.whl (7.7MB)
     |████████████████████████████████| 7.7MB 528kB/s 
Collecting scipy
  Downloading https://files.pythonhosted.org/packages/85/7a/ae480be23b768910a9327c33517ced4623ba88dc035f9ce0206657c353a9/scipy-1.4.1-cp37-cp37m-macosx_10_6_intel.whl (28.4MB)
     |████████████████████████████████| 28.4MB 1.0MB/s 
Requirement already satisfied: numpy in /usr/local/lib/python3.7/site-packages (from -r ./requirements.txt (line 3)) (1.18.1)
Collecting matplotlib
  Downloading https://files.pythonhosted.org/packages/a8/69/2559780612c3d477218af93d7a20938d5bffeb57630279202967e321d03b/matplotlib-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (12.4MB)
     |████████████████████████████████| 12.5MB 6.7MB/s 
Collecting ipywidgets
  Downloading https://files.pythonhosted.org/packages/56/a0/dbcf5881bb2f51e8db678211907f16ea0a182b232c591a6d6f276985ca95/ipywidgets-7.5.1-py2.py3-none-any.whl (121kB)
     |████████████████████████████████| 122kB 6.9MB/s 
Collecting sklearn
  Downloading https://files.pythonhosted.org/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz
Collecting vpype
  Cloning https://github.com/abey79/vpype.git to /private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/vpype
  Running command git clone -q https://github.com/abey79/vpype.git /private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/vpype
  Installing build dependencies ... /done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting tornado!=6.0.0,!=6.0.1,!=6.0.2
  Downloading https://files.pythonhosted.org/packages/95/84/119a46d494f008969bf0c775cb2c6b3579d3c4cc1bb1b41a022aa93ee242/tornado-6.0.4.tar.gz (496kB)
     |████████████████████████████████| 501kB 21.2MB/s 
Collecting notebook>=4.3.1
  Downloading https://files.pythonhosted.org/packages/b1/f1/0a67f09ef53a342403ffa66646ee39273e0ac79ffa5de5dbe2f3e28b5bdf/notebook-6.0.3-py3-none-any.whl (9.7MB)
     |████████████████████████████████| 9.7MB 5.6MB/s 
Collecting jinja2>=2.10
  Downloading https://files.pythonhosted.org/packages/27/24/4f35961e5c669e96f6559760042a55b9bcfcdb82b9bdb3c8753dbe042e35/Jinja2-2.11.1-py2.py3-none-any.whl (126kB)
     |████████████████████████████████| 133kB 7.6MB/s 
Collecting jupyterlab-server~=1.0.0
  Downloading https://files.pythonhosted.org/packages/3c/ea/ae83699c4217d5668f62402445bbe4da11cc63898fbe7a57d8fed6281a04/jupyterlab_server-1.0.7-py3-none-any.whl
Collecting kiwisolver>=1.0.1
  Downloading https://files.pythonhosted.org/packages/df/93/8bc9b52a8846be2b9572aa0a7c881930939b06e4abe1162da6a0430b794f/kiwisolver-1.1.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (113kB)
     |████████████████████████████████| 122kB 21.7MB/s 
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
  Downloading https://files.pythonhosted.org/packages/5d/bc/1e58593167fade7b544bfe9502a26dc860940a79ab306e651e7f13be68c2/pyparsing-2.4.6-py2.py3-none-any.whl (67kB)
     |████████████████████████████████| 71kB 15.3MB/s 
Collecting python-dateutil>=2.1
  Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
     |████████████████████████████████| 235kB 32.2MB/s 
Collecting cycler>=0.10
  Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting ipython>=4.0.0; python_version >= "3.3"
  Downloading https://files.pythonhosted.org/packages/61/6f/69f1eec859ce48a86660529b166b6ea466f0f4ab98e4fc0807b835aa22c6/ipython-7.13.0-py3-none-any.whl (780kB)
     |████████████████████████████████| 788kB 22.3MB/s 
Collecting traitlets>=4.3.1
  Downloading https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl (75kB)
     |████████████████████████████████| 81kB 16.7MB/s 
Collecting widgetsnbextension~=3.5.0
  Downloading https://files.pythonhosted.org/packages/6c/7b/7ac231c20d2d33c445eaacf8a433f4e22c60677eb9776c7c5262d7ddee2d/widgetsnbextension-3.5.1-py2.py3-none-any.whl (2.2MB)
     |████████████████████████████████| 2.2MB 22.2MB/s 
Collecting nbformat>=4.2.0
  Downloading https://files.pythonhosted.org/packages/ac/eb/de575b7a64e7ab8d8c95e4c180ccc36deda3f1379186c4ee7adf6c2f1586/nbformat-5.0.4-py3-none-any.whl (169kB)
     |████████████████████████████████| 174kB 8.0MB/s 
Collecting ipykernel>=4.5.1
  Downloading https://files.pythonhosted.org/packages/d7/62/d1a5d654b7a21bd3eb99be1b59a608cc18a7a08ed88495457a87c40a0495/ipykernel-5.1.4-py3-none-any.whl (116kB)
     |████████████████████████████████| 122kB 31.0MB/s 
Collecting scikit-learn
  Downloading https://files.pythonhosted.org/packages/64/57/23176044d9371e1af286176fd61cf7f74ed46d0b99122624ab93b3f32715/scikit_learn-0.22.2.post1-cp37-cp37m-macosx_10_9_x86_64.whl (7.1MB)
     |████████████████████████████████| 7.1MB 5.2MB/s 
Collecting rtree
  Downloading https://files.pythonhosted.org/packages/56/6f/f1e91001d5ad9fa9bed65875152f5a1c7955c5763168cae309546e6e9fda/Rtree-0.9.4.tar.gz (62kB)
     |████████████████████████████████| 71kB 6.9MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/local/Cellar/python/3.7.6_1/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/setup.py'"'"'; __file__='"'"'/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/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/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/pip-egg-info
         cwd: /private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/setup.py", line 3, in <module>
        import rtree
      File "/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/rtree/__init__.py", line 1, in <module>
        from .index import Rtree
      File "/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/rtree/rtree/index.py", line 6, in <module>
        from . import core
      File "/private/var/folders/np/p2l_35355cx371ydxlhfhp0r0000gn/T/pip-install-195_6qdc/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.
zoso95 commented 4 years ago

ahhh looks like this requires libspatialindex which isn't automatically installed

https://github.com/Toblerity/rtree/issues/147