holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
598 stars 77 forks source link

segmentation fault when importing geoviews #86

Closed rabernat closed 6 years ago

rabernat commented 7 years ago

I am trying to run geoviews within the following conda environment.

name: geo_scipy
channels:
    - conda-forge
    - defaults
    - ioam
dependencies:
    - python=3.6    # Python version 3.6
    - bottleneck    # C-optimized array functions for NumPy
    - cartopy       # Geographic plotting toolkit
    - cython        # Transpile Python->C
    - dask          # Parallel processing library
    - future        # Python 2/3 compatibility
    - h5py          # Wrapper for HDF5
    - ipython       # IPython interpreter and tools
    - jupyter       # Jupyter federation architecture
    - matplotlib    # 2D plotting library
    - netcdf4       # Wrapper for netcdf4
    - notebook      # Notebook interface
    - numpy         # N-d array and numerics
    - pandas        # Labeled array library
    - pyresample    # Geographic resampling tools
    - scipy         # Common math/stats/science functions
    - scikit-learn  # Macine learning library
    - scikit-image  # Image processing routines
    - statsmodels   # Regression/modeling toolkit
    - seaborn       # Statistical visualizations
    - six           # Python 2/3 compatibility
    - tqdm          # Nice progressbar for longer computations
    - xarray        # N-d labeled array library
    - nb_conda
    - holoviews
    - geoviews
    - gsw

I activate the enviroment and run python -c 'import geoviews'. I get the following segfault.

Assertion failed: (0 != cs), function GEOSCoordSeq_setOrdinate_r, file geos_ts_c.cpp, line 3657.
Abort trap: 6

Note that this does work if I create an environment just for geoviews, i.e.

conda create --name geoviews_test -c conda-forge -c ioam holoviews geoviews

So something about the environment above is causing some sort of library conflict.

The full conda env dump is below

``` # packages in environment at /Users/rpa/anaconda/envs/geo_scipy: # appnope 0.1.0 py36_0 conda-forge asn1crypto 0.22.0 py36_0 conda-forge bkcharts 0.2 py36_0 conda-forge blas 1.1 openblas conda-forge bleach 2.0.0 py36_0 conda-forge bokeh 0.12.6 py36_0 conda-forge bottleneck 1.2.1 np113py36_0 conda-forge ca-certificates 2017.7.27.1 0 conda-forge cartopy 0.15.1 py36_4 conda-forge certifi 2017.7.27.1 py36_0 conda-forge cffi 1.10.0 py36_0 conda-forge chardet 3.0.4 py36_0 conda-forge click 6.7 py36_0 conda-forge cloudpickle 0.4.0 py36_0 conda-forge configobj 5.0.6 py36_0 cryptography 2.0.3 py36_0 conda-forge curl 7.54.1 0 conda-forge cycler 0.10.0 py36_0 conda-forge cython 0.26 py36_0 conda-forge dask 0.15.2 py36_0 conda-forge dask-core 0.15.2 py36_0 conda-forge decorator 4.1.2 py36_0 conda-forge distributed 1.18.3 py36_0 conda-forge entrypoints 0.2.3 py36_1 conda-forge freetype 2.7 1 conda-forge future 0.16.0 py36_0 conda-forge geos 3.5.1 1 conda-forge geoviews 1.3.2 py36_0 ioam gsw 3.1.1 np113py36_0 conda-forge h5netcdf 0.4.1 py_0 conda-forge h5py 2.7.1 py36_1 conda-forge hdf4 4.2.12 0 conda-forge hdf5 1.8.18 0 conda-forge heapdict 1.0.0 py36_0 conda-forge holoviews 1.8.3 py36_0 conda-forge html5lib 0.999999999 py36_0 conda-forge icu 58.1 1 conda-forge idna 2.5 py36_0 conda-forge imageio 2.2.0 py36_0 conda-forge ipykernel 4.6.1 py36_0 conda-forge ipython 6.1.0 py36_0 conda-forge ipython_genutils 0.2.0 py36_0 conda-forge ipywidgets 7.0.0 py36_1 conda-forge jedi 0.10.2 py36_0 conda-forge jinja2 2.9.6 py36_0 conda-forge jpeg 9b 0 conda-forge jsonschema 2.6.0 py36_0 conda-forge jupyter 1.0.0 py36_0 conda-forge jupyter_client 5.1.0 py36_0 conda-forge jupyter_console 5.1.0 py36_0 conda-forge jupyter_core 4.3.0 py36_0 conda-forge krb5 1.14.2 0 conda-forge lancet 0.9.0 py36_0 conda-forge libffi 3.2.1 3 conda-forge libgfortran 3.0.0 0 conda-forge libiconv 1.14 4 conda-forge libnetcdf 4.4.1.1 5 conda-forge libpng 1.6.28 0 conda-forge libsodium 1.0.10 0 conda-forge libssh2 1.8.0 1 conda-forge libtiff 4.0.6 7 conda-forge libxml2 2.9.4 4 conda-forge libxslt 1.1.29 5 conda-forge locket 0.2.0 py36_1 conda-forge lxml 3.8.0 py36_0 conda-forge markupsafe 1.0 py36_0 conda-forge matplotlib 2.0.2 py36_2 conda-forge mistune 0.7.4 py36_0 conda-forge msgpack-python 0.4.8 py36_0 conda-forge nbconvert 5.2.1 py36_1 conda-forge nbformat 4.3.0 py36_0 conda-forge ncurses 5.9 10 conda-forge netcdf4 1.2.9 py36_1 conda-forge networkx 1.11 py36_0 conda-forge notebook 5.0.0 py36_0 conda-forge numexpr 2.6.2 np113py36_0 conda-forge numpy 1.13.1 py36_blas_openblas_200 [blas_openblas] conda-forge olefile 0.44 py36_0 conda-forge openblas 0.2.19 2 conda-forge openssl 1.0.2l 0 conda-forge owslib 0.14.0 py36_1 conda-forge pandas 0.20.3 py36_1 conda-forge pandoc 1.19.2 0 conda-forge pandocfilters 1.4.1 py36_0 conda-forge param 1.5.1 py36_0 conda-forge partd 0.3.8 py36_0 conda-forge patsy 0.4.1 py36_0 conda-forge pexpect 4.2.1 py36_0 conda-forge pickleshare 0.7.4 py36_0 conda-forge pillow 4.2.1 py36_0 conda-forge pip 9.0.1 py36_0 conda-forge proj4 4.9.3 4 conda-forge prompt_toolkit 1.0.15 py36_0 conda-forge psutil 5.2.2 py36_0 conda-forge ptyprocess 0.5.2 py36_0 conda-forge pycparser 2.18 py36_0 conda-forge pyepsg 0.3.2 py36_0 conda-forge pygments 2.2.0 py36_0 conda-forge pykdtree 1.2.2 py36_1 conda-forge pyopenssl 17.2.0 py36_0 conda-forge pyparsing 2.2.0 py36_0 conda-forge pyproj 1.9.5.1 py36_0 conda-forge pyqt 5.6.0 py36_4 conda-forge pyresample 1.5.0 np113py36_0 conda-forge pyshp 1.2.12 py_0 conda-forge pysocks 1.6.7 py36_0 conda-forge python 3.6.2 0 conda-forge python-dateutil 2.6.1 py36_0 conda-forge pytz 2017.2 py36_0 conda-forge pywavelets 0.5.2 np113py36_0 conda-forge pyyaml 3.12 py36_1 conda-forge pyzmq 16.0.2 py36_2 conda-forge qt 5.6.2 h9e3eb04_4 conda-forge qtconsole 4.3.1 py36_0 conda-forge readline 6.2 0 conda-forge requests 2.18.4 py36_1 conda-forge rise 5.0.0 py36_0 damianavila82 scikit-image 0.13.0 py36_1 conda-forge scikit-learn 0.19.0 py36_blas_openblas_201 [blas_openblas] conda-forge scipy 0.19.1 py36_blas_openblas_202 [blas_openblas] conda-forge seaborn 0.8.1 py36_0 conda-forge setuptools 36.3.0 py36_0 conda-forge shapely 1.6.1 py36_0 conda-forge simplegeneric 0.8.1 py36_0 conda-forge sip 4.18 py36_1 conda-forge six 1.10.0 py36_1 conda-forge sortedcontainers 1.5.7 py36_0 conda-forge sqlite 3.13.0 1 conda-forge statsmodels 0.8.0 np113py36_0 conda-forge tblib 1.3.2 py36_0 conda-forge terminado 0.6 py36_0 conda-forge testpath 0.3.1 py36_0 conda-forge tk 8.5.19 2 conda-forge toolz 0.8.2 py36_0 conda-forge tornado 4.5.1 py36_0 conda-forge tqdm 4.15.0 py36_0 conda-forge traitlets 4.3.2 py36_0 conda-forge urllib3 1.22 py36_0 conda-forge wcwidth 0.1.7 py36_0 conda-forge webencodings 0.5 py36_0 conda-forge wheel 0.29.0 py36_0 conda-forge widgetsnbextension 3.0.2 py36_0 conda-forge xarray 0.9.6 py36_0 conda-forge xz 5.2.3 0 conda-forge yaml 0.1.6 0 conda-forge zeromq 4.2.1 1 conda-forge zict 0.1.2 py36_0 conda-forge zlib 1.2.11 0 conda-forge ```
philippjfr commented 7 years ago

Thanks for reporting this. I ran into the same thing recently which was due to a version of GEOS I had installed with brew, but it went away when I uninstalled that. It is also identical to this issue reported on cartopy: https://github.com/SciTools/cartopy/issues/738

I'll keep digging and let you know if I find something.

philippjfr commented 6 years ago

We've encountered this a few times and it's definitely a system wide install of GEOS messing with the conda version. Please reopen as necessary but I'll close this for now.