IBMDataScience / DSx-Desktop

IBM Data Science Experience Desktop was built for those who want to download and play locally. Analyze, learn, and build with the tools you love, right on your desktop.
33 stars 18 forks source link

Problem installing and deploying geopandas on DSX #5

Closed jpmora69 closed 7 years ago

jpmora69 commented 7 years ago

I downloaded and installed DSX desktop on my windows 7 laptop and tried to run a snippet of code I previously had running on anaconda with python 2.7 directly installed on an alternate machine that requires the geopandas library. Since the library was not pre-installed with the DSX included package I tried to pip install it myself from the jupyter notebook interface (including all required pre-requisites), apparently with success:

Requirement already satisfied: geopandas in /opt/conda/envs/python2/lib/python2.7/site-packages Requirement already satisfied: pandas in /opt/conda/envs/python2/lib/python2.7/site-packages (from geopandas) Requirement already satisfied: pyproj in /opt/conda/envs/python2/lib/python2.7/site-packages (from geopandas) Requirement already satisfied: fiona in /opt/conda/envs/python2/lib/python2.7/site-packages (from geopandas) Requirement already satisfied: shapely in /opt/conda/envs/python2/lib/python2.7/site-packages (from geopandas) Requirement already satisfied: descartes in /opt/conda/envs/python2/lib/python2.7/site-packages (from geopandas) Requirement already satisfied: python-dateutil in /opt/conda/envs/python2/lib/python2.7/site-packages (from pandas->geopandas) Requirement already satisfied: pytz>=2011k in /opt/conda/envs/python2/lib/python2.7/site-packages (from pandas->geopandas) Requirement already satisfied: numpy>=1.7.0 in /opt/conda/envs/python2/lib/python2.7/site-packages (from pandas->geopandas) Requirement already satisfied: cligj in /opt/conda/envs/python2/lib/python2.7/site-packages (from fiona->geopandas) Requirement already satisfied: click-plugins in /opt/conda/envs/python2/lib/python2.7/site-packages (from fiona->geopandas) Requirement already satisfied: six in /opt/conda/envs/python2/lib/python2.7/site-packages (from fiona->geopandas) Requirement already satisfied: munch in /opt/conda/envs/python2/lib/python2.7/site-packages (from fiona->geopandas) Requirement already satisfied: matplotlib in /opt/conda/envs/python2/lib/python2.7/site-packages (from descartes->geopandas) Requirement already satisfied: click>=4.0 in /opt/conda/envs/python2/lib/python2.7/site-packages (from cligj->fiona->geopandas) Requirement already satisfied: functools32 in /opt/conda/envs/python2/lib/python2.7/site-packages (from matplotlib->descartes->geopandas) Requirement already satisfied: subprocess32 in /opt/conda/envs/python2/lib/python2.7/site-packages (from matplotlib->descartes->geopandas) Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/python2/lib/python2.7/site-packages/cycler-0.10.0-py2.7.egg (from matplotlib->descartes->geopandas) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /opt/conda/envs/python2/lib/python2.7/site-packages (from matplotlib->descartes->geopandas)

However, when I tried to load the library I some errors, that are related to impossibility to locate the libgeos library that is necessary to run geopandas, that i'm attaching:

OSError: Could not find lib geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so'].

I have looked in several stack overflow threads to fin a possible solution under the assumption that the VM that is supporting the DSX application is a Linux one, but none of the solutions seems to work, perhaps by the fact that the application is running on top of a Docker container instead of a proper Linux image. I have also tried to do a clean installation of the libgeos library using the conda install command (!conda install -c conda-forge geos ) , but since a system entry is needed, there is no way that I can do it directly from a notebook.

Can you please check if there is a viable solution for this issue?

Thanks!

Debbani commented 7 years ago

@jpmora69 You mentioned that you had your snippet of code running previously on anaconda with python 2.7. Please can you let us know on what version of DSX Desktop was this working for you and what is the version of DSX Desktop that you've installed now?

Debbani commented 7 years ago

@jpmora69 Please can you verify this with the latest version of DSX Desktop: 1.01.03 and please let us know if your problem still persists.

jpmora69 commented 7 years ago

Hey Debanni, sorry I haven't answer before; the snippet of code that I used in DSX Desktop was originally created in a raw python 2.7 installation (anaconda) on a windows 10 personal machine; The problem that I'm having to install and load the geopandas library is taking place on DSX desktop on a windows 7 machine.

I uninstalled the previous version of DSX that I had today, and performed a clean installation of version 1.1.3 and performed once again the pip installation of the geopandas library, but I'm still geting the same error when loading (Could not find lib geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so'].) even thought the pip installation seems to be ending correctly.

sahilshah2211 commented 7 years ago

@jpmora69 The geopandas support currently is added in Anaconda with Spark. So under python2 or python3 environment in Anaconda with spark installation of our latest release, geopandas can be installed by this command in the notebook: !conda install -y -c conda-forge geopandas After that you should be able to import geopandas.

jpmora69 commented 7 years ago

Thank you very much for your help and support; I confirm that the command provided was successfully used to install the geopandas library.

Debbani commented 7 years ago

@jpmora69 Thank you for confirming that the command works for you now. Closing this issue now.