matplotlib/basemap

Segmentation Fault due To build conflicts

SoundsSerious opened this issue · 4 comments

Hi, I'm observing a segmentation fault as described in jupyter/qtconsole#585 of which I believe basemap is the root cause.

This is due to underlying conda c-library conflicts.

It seems the underlying issue with basemap support is the build process for libgeos. I wonder if life would be easier by making calls to https://pygeos.readthedocs.io/en/stable/ instead?

To replicate this issue, this is the minimal build script that results in failure.

This occurs on windows system linux - ubuntu 22.04 & 20.04

conda env remove nept -y
conda create -n nept -c conda-forge  python=3.9.12 -y
conda activate nept
conda install -c conda-forge basemap qtconsole -y
jupyter qtconsole #This fails with segmentation fault.

Hi @SoundsSerious! I am not an expert on Miniforge/Anaconda, but I tried to follow your steps in a clean Miniforge installation on Windows 64-bit and your commands seem to work successfully.

First I create the new environment:

(base) C:\Users\vic>conda create -y -n nept -c conda-forge python=3.9.12
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 23.3.1
  latest version: 23.11.0

Please update conda by running

    $ conda update -n base -c conda-forge conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.11.0



## Package Plan ##

  environment location: C:\Users\vic\miniforge3\envs\nept

  added / updated specs:
    - python=3.9.12


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bzip2-1.0.8                |       hcfcfb64_5         122 KB  conda-forge
    ca-certificates-2023.11.17 |       h56e8100_0         151 KB  conda-forge
    libsqlite-3.44.2           |       hcfcfb64_0         833 KB  conda-forge
    openssl-3.2.0              |       hcfcfb64_1         7.9 MB  conda-forge
    pip-23.3.2                 |     pyhd8ed1ab_0         1.3 MB  conda-forge
    python-3.9.12              |hcf16a7b_1_cpython        17.9 MB  conda-forge
    setuptools-68.2.2          |     pyhd8ed1ab_0         454 KB  conda-forge
    sqlite-3.44.2              |       hcfcfb64_0         836 KB  conda-forge
    tk-8.6.13                  |       h5226925_1         3.3 MB  conda-forge
    tzdata-2023d               |       h0c530f3_0         117 KB  conda-forge
    vc-14.3                    |      hcf57466_18          17 KB  conda-forge
    vc14_runtime-14.38.33130   |      h82b7239_18         732 KB  conda-forge
    vs2015_runtime-14.38.33130 |      hcb4865c_18          17 KB  conda-forge
    wheel-0.42.0               |     pyhd8ed1ab_0          56 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        33.7 MB

The following NEW packages will be INSTALLED:

  bzip2              conda-forge/win-64::bzip2-1.0.8-hcfcfb64_5
  ca-certificates    conda-forge/win-64::ca-certificates-2023.11.17-h56e8100_0
  libffi             conda-forge/win-64::libffi-3.4.2-h8ffe710_5
  libsqlite          conda-forge/win-64::libsqlite-3.44.2-hcfcfb64_0
  libzlib            conda-forge/win-64::libzlib-1.2.13-hcfcfb64_5
  openssl            conda-forge/win-64::openssl-3.2.0-hcfcfb64_1
  pip                conda-forge/noarch::pip-23.3.2-pyhd8ed1ab_0
  python             conda-forge/win-64::python-3.9.12-hcf16a7b_1_cpython
  setuptools         conda-forge/noarch::setuptools-68.2.2-pyhd8ed1ab_0
  sqlite             conda-forge/win-64::sqlite-3.44.2-hcfcfb64_0
  tk                 conda-forge/win-64::tk-8.6.13-h5226925_1
  tzdata             conda-forge/noarch::tzdata-2023d-h0c530f3_0
  ucrt               conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0
  vc                 conda-forge/win-64::vc-14.3-hcf57466_18
  vc14_runtime       conda-forge/win-64::vc14_runtime-14.38.33130-h82b7239_18
  vs2015_runtime     conda-forge/win-64::vs2015_runtime-14.38.33130-hcb4865c_18
  wheel              conda-forge/noarch::wheel-0.42.0-pyhd8ed1ab_0
  xz                 conda-forge/win-64::xz-5.2.6-h8d14728_0



Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate nept
#
# To deactivate an active environment, use
#
#     $ conda deactivate

Second, I activate the "nept" environment and install basemap and qtconsole from the conda-forge channel:

(base) C:\Users\vic>conda activate nept

(nept) C:\Users\vic>conda install -y -c conda-forge basemap qtconsole
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 23.3.1
  latest version: 23.11.0

Please update conda by running

    $ conda update -n base -c conda-forge conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.11.0



## Package Plan ##

  environment location: C:\Users\vic\miniforge3\envs\nept

  added / updated specs:
    - basemap
    - qtconsole


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    asttokens-2.4.1            |     pyhd8ed1ab_0          28 KB  conda-forge
    basemap-1.3.9              |   py39hbe530b1_0         257 KB  conda-forge
    basemap-data-1.3.2         |     pyhd8ed1ab_3        24.1 MB  conda-forge
    brotli-1.1.0               |       hcfcfb64_1          19 KB  conda-forge
    brotli-bin-1.1.0           |       hcfcfb64_1          20 KB  conda-forge
    certifi-2023.11.17         |     pyhd8ed1ab_0         155 KB  conda-forge
    comm-0.1.4                 |     pyhd8ed1ab_0          11 KB  conda-forge
    contourpy-1.2.0            |   py39h1f6ef14_0         182 KB  conda-forge
    cycler-0.12.1              |     pyhd8ed1ab_0          13 KB  conda-forge
    debugpy-1.8.0              |   py39h99910a6_1         3.1 MB  conda-forge
    decorator-5.1.1            |     pyhd8ed1ab_0          12 KB  conda-forge
    exceptiongroup-1.2.0       |     pyhd8ed1ab_0          20 KB  conda-forge
    executing-2.0.1            |     pyhd8ed1ab_0          27 KB  conda-forge
    fonttools-4.47.0           |   py39ha55989b_0         1.8 MB  conda-forge
    freetype-2.12.1            |       hdaf720e_2         498 KB  conda-forge
    geos-3.12.1                |       h1537add_0         1.5 MB  conda-forge
    gettext-0.21.1             |       h5728263_0         5.3 MB  conda-forge
    glib-2.78.3                |       h12be248_0         495 KB  conda-forge
    glib-tools-2.78.3          |       h12be248_0         141 KB  conda-forge
    gst-plugins-base-1.22.8    |       h001b923_0         1.9 MB  conda-forge
    gstreamer-1.22.8           |       hb4038d2_0         1.8 MB  conda-forge
    icu-72.1                   |       h63175ca_0        12.6 MB  conda-forge
    importlib-metadata-7.0.1   |     pyha770c72_0          26 KB  conda-forge
    importlib-resources-6.1.1  |     pyhd8ed1ab_0           9 KB  conda-forge
    importlib_metadata-7.0.1   |       hd8ed1ab_0           9 KB  conda-forge
    importlib_resources-6.1.1  |     pyhd8ed1ab_0          29 KB  conda-forge
    intel-openmp-2023.2.0      |   h57928b3_50497         2.4 MB  conda-forge
    ipykernel-6.28.0           |     pyha63f2e9_0         114 KB  conda-forge
    ipython-8.18.1             |     pyh7428d3b_3         576 KB  conda-forge
    jedi-0.19.1                |     pyhd8ed1ab_0         822 KB  conda-forge
    jupyter_client-8.6.0       |     pyhd8ed1ab_0         103 KB  conda-forge
    jupyter_core-5.6.0         |   py39hcbf5309_0          94 KB  conda-forge
    kiwisolver-1.4.5           |   py39h1f6ef14_1          54 KB  conda-forge
    krb5-1.20.1                |       heb0366b_0         701 KB  conda-forge
    lcms2-2.15                 |       h3e3b177_1         487 KB  conda-forge
    lerc-4.0.0                 |       h63175ca_0         190 KB  conda-forge
    libblas-3.9.0              |     20_win64_mkl         4.8 MB  conda-forge
    libbrotlicommon-1.1.0      |       hcfcfb64_1          69 KB  conda-forge
    libbrotlidec-1.1.0         |       hcfcfb64_1          32 KB  conda-forge
    libbrotlienc-1.1.0         |       hcfcfb64_1         241 KB  conda-forge
    libcblas-3.9.0             |     20_win64_mkl         4.8 MB  conda-forge
    libclang-16.0.6            |default_heb8d277_2          35 KB  conda-forge
    libclang13-16.0.6          |default_hc80b9e7_2        22.1 MB  conda-forge
    libcurl-8.1.2              |       h68f0423_0         306 KB  conda-forge
    libdeflate-1.18            |       hcfcfb64_0         149 KB  conda-forge
    libglib-2.78.3             |       h16e383f_0         2.5 MB  conda-forge
    libhwloc-2.9.3             |default_haede6df_1009         2.5 MB  conda-forge
    libiconv-1.17              |       hcfcfb64_2         621 KB  conda-forge
    libjpeg-turbo-2.1.5.1      |       hcfcfb64_1         672 KB  conda-forge
    liblapack-3.9.0            |     20_win64_mkl         4.8 MB  conda-forge
    libogg-1.3.4               |       h8ffe710_1          34 KB  conda-forge
    libpng-1.6.39              |       h19919ed_0         336 KB  conda-forge
    libsodium-1.0.18           |       h8d14728_1         697 KB  conda-forge
    libtiff-4.5.1              |       h6c8260b_1         931 KB  conda-forge
    libvorbis-1.3.7            |       h0e60522_0         267 KB  conda-forge
    libwebp-base-1.3.2         |       hcfcfb64_0         263 KB  conda-forge
    libxcb-1.15                |       hcd874cb_0         947 KB  conda-forge
    libxml2-2.11.6             |       hc3477c8_0         1.6 MB  conda-forge
    m2w64-gcc-libgfortran-5.3.0|                6         342 KB  conda-forge
    m2w64-gcc-libs-5.3.0       |                7         520 KB  conda-forge
    m2w64-gcc-libs-core-5.3.0  |                7         214 KB  conda-forge
    m2w64-gmp-6.1.0            |                2         726 KB  conda-forge
    m2w64-libwinpthread-git-5.0.0.4634.697f757|                2          31 KB  conda-forge
    matplotlib-base-3.7.3      |   py39hf19769e_0         6.3 MB  conda-forge
    matplotlib-inline-0.1.6    |     pyhd8ed1ab_0          12 KB  conda-forge
    mkl-2023.2.0               |   h6a75c08_50497       138.0 MB  conda-forge
    msys2-conda-epoch-20160418 |                1           3 KB  conda-forge
    munkres-1.1.4              |     pyh9f0ad1d_0          12 KB  conda-forge
    nest-asyncio-1.5.8         |     pyhd8ed1ab_0          11 KB  conda-forge
    numpy-1.26.2               |   py39hddb5d58_0         5.7 MB  conda-forge
    openjpeg-2.5.0             |       ha2aaf27_2         232 KB  conda-forge
    packaging-23.2             |     pyhd8ed1ab_0          48 KB  conda-forge
    parso-0.8.3                |     pyhd8ed1ab_0          69 KB  conda-forge
    pcre2-10.42                |       h17e33f8_0         860 KB  conda-forge
    pickleshare-0.7.5          |          py_1003           9 KB  conda-forge
    pillow-10.0.0              |   py39ha9166d5_0        43.9 MB  conda-forge
    platformdirs-4.1.0         |     pyhd8ed1ab_0          20 KB  conda-forge
    ply-3.11                   |             py_1          44 KB  conda-forge
    proj-9.2.1                 |       h660b3b0_0         2.5 MB  conda-forge
    prompt-toolkit-3.0.42      |     pyha770c72_0         264 KB  conda-forge
    psutil-5.9.7               |   py39ha55989b_0         370 KB  conda-forge
    pthread-stubs-0.4          |    hcd874cb_1001           6 KB  conda-forge
    pthreads-win32-2.9.1       |       hfa6e2cd_3         141 KB  conda-forge
    pure_eval-0.2.2            |     pyhd8ed1ab_0          14 KB  conda-forge
    pygments-2.17.2            |     pyhd8ed1ab_0         840 KB  conda-forge
    pyparsing-3.1.1            |     pyhd8ed1ab_0          87 KB  conda-forge
    pyproj-3.6.1               |   py39hd6181e6_0         694 KB  conda-forge
    pyqt-5.15.9                |   py39hb77abff_5         3.7 MB  conda-forge
    pyqt5-sip-12.12.2          |   py39h99910a6_5          78 KB  conda-forge
    pyshp-2.3.1                |     pyhd8ed1ab_0         941 KB  conda-forge
    python-dateutil-2.8.2      |     pyhd8ed1ab_0         240 KB  conda-forge
    python_abi-3.9             |           4_cp39           7 KB  conda-forge
    pywin32-306                |   py39h99910a6_2         5.5 MB  conda-forge
    pyzmq-25.1.2               |   py39h7eaf5a6_0         398 KB  conda-forge
    qt-main-5.15.8             |      h2c8576c_12        56.9 MB  conda-forge
    qtconsole-5.5.1            |     pyhd8ed1ab_0           7 KB  conda-forge
    qtconsole-base-5.5.1       |     pyha770c72_0          98 KB  conda-forge
    qtpy-2.4.1                 |     pyhd8ed1ab_0          60 KB  conda-forge
    sip-6.7.12                 |   py39h99910a6_0         491 KB  conda-forge
    six-1.16.0                 |     pyh6c4a22f_0          14 KB  conda-forge
    stack_data-0.6.2           |     pyhd8ed1ab_0          26 KB  conda-forge
    tbb-2021.11.0              |       h91493d7_0         157 KB  conda-forge
    toml-0.10.2                |     pyhd8ed1ab_0          18 KB  conda-forge
    tomli-2.0.1                |     pyhd8ed1ab_0          16 KB  conda-forge
    tornado-6.3.3              |   py39ha55989b_1         620 KB  conda-forge
    traitlets-5.14.0           |     pyhd8ed1ab_0         107 KB  conda-forge
    typing_extensions-4.9.0    |     pyha770c72_0          35 KB  conda-forge
    unicodedata2-15.1.0        |   py39ha55989b_0         365 KB  conda-forge
    wcwidth-0.2.12             |     pyhd8ed1ab_0          32 KB  conda-forge
    xorg-libxau-1.0.11         |       hcd874cb_0          50 KB  conda-forge
    xorg-libxdmcp-1.1.3        |       hcd874cb_0          66 KB  conda-forge
    zeromq-4.3.5               |       h63175ca_0         4.0 MB  conda-forge
    zipp-3.17.0                |     pyhd8ed1ab_0          19 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       383.7 MB

The following NEW packages will be INSTALLED:

  asttokens          conda-forge/noarch::asttokens-2.4.1-pyhd8ed1ab_0
  basemap            conda-forge/win-64::basemap-1.3.9-py39hbe530b1_0
  basemap-data       conda-forge/noarch::basemap-data-1.3.2-pyhd8ed1ab_3
  brotli             conda-forge/win-64::brotli-1.1.0-hcfcfb64_1
  brotli-bin         conda-forge/win-64::brotli-bin-1.1.0-hcfcfb64_1
  certifi            conda-forge/noarch::certifi-2023.11.17-pyhd8ed1ab_0
  colorama           conda-forge/noarch::colorama-0.4.6-pyhd8ed1ab_0
  comm               conda-forge/noarch::comm-0.1.4-pyhd8ed1ab_0
  contourpy          conda-forge/win-64::contourpy-1.2.0-py39h1f6ef14_0
  cycler             conda-forge/noarch::cycler-0.12.1-pyhd8ed1ab_0
  debugpy            conda-forge/win-64::debugpy-1.8.0-py39h99910a6_1
  decorator          conda-forge/noarch::decorator-5.1.1-pyhd8ed1ab_0
  exceptiongroup     conda-forge/noarch::exceptiongroup-1.2.0-pyhd8ed1ab_0
  executing          conda-forge/noarch::executing-2.0.1-pyhd8ed1ab_0
  fonttools          conda-forge/win-64::fonttools-4.47.0-py39ha55989b_0
  freetype           conda-forge/win-64::freetype-2.12.1-hdaf720e_2
  geos               conda-forge/win-64::geos-3.12.1-h1537add_0
  gettext            conda-forge/win-64::gettext-0.21.1-h5728263_0
  glib               conda-forge/win-64::glib-2.78.3-h12be248_0
  glib-tools         conda-forge/win-64::glib-tools-2.78.3-h12be248_0
  gst-plugins-base   conda-forge/win-64::gst-plugins-base-1.22.8-h001b923_0
  gstreamer          conda-forge/win-64::gstreamer-1.22.8-hb4038d2_0
  icu                conda-forge/win-64::icu-72.1-h63175ca_0
  importlib-metadata conda-forge/noarch::importlib-metadata-7.0.1-pyha770c72_0
  importlib-resourc~ conda-forge/noarch::importlib-resources-6.1.1-pyhd8ed1ab_0
  importlib_metadata conda-forge/noarch::importlib_metadata-7.0.1-hd8ed1ab_0
  importlib_resourc~ conda-forge/noarch::importlib_resources-6.1.1-pyhd8ed1ab_0
  intel-openmp       conda-forge/win-64::intel-openmp-2023.2.0-h57928b3_50497
  ipykernel          conda-forge/noarch::ipykernel-6.28.0-pyha63f2e9_0
  ipython            conda-forge/noarch::ipython-8.18.1-pyh7428d3b_3
  jedi               conda-forge/noarch::jedi-0.19.1-pyhd8ed1ab_0
  jupyter_client     conda-forge/noarch::jupyter_client-8.6.0-pyhd8ed1ab_0
  jupyter_core       conda-forge/win-64::jupyter_core-5.6.0-py39hcbf5309_0
  kiwisolver         conda-forge/win-64::kiwisolver-1.4.5-py39h1f6ef14_1
  krb5               conda-forge/win-64::krb5-1.20.1-heb0366b_0
  lcms2              conda-forge/win-64::lcms2-2.15-h3e3b177_1
  lerc               conda-forge/win-64::lerc-4.0.0-h63175ca_0
  libblas            conda-forge/win-64::libblas-3.9.0-20_win64_mkl
  libbrotlicommon    conda-forge/win-64::libbrotlicommon-1.1.0-hcfcfb64_1
  libbrotlidec       conda-forge/win-64::libbrotlidec-1.1.0-hcfcfb64_1
  libbrotlienc       conda-forge/win-64::libbrotlienc-1.1.0-hcfcfb64_1
  libcblas           conda-forge/win-64::libcblas-3.9.0-20_win64_mkl
  libclang           conda-forge/win-64::libclang-16.0.6-default_heb8d277_2
  libclang13         conda-forge/win-64::libclang13-16.0.6-default_hc80b9e7_2
  libcurl            conda-forge/win-64::libcurl-8.1.2-h68f0423_0
  libdeflate         conda-forge/win-64::libdeflate-1.18-hcfcfb64_0
  libglib            conda-forge/win-64::libglib-2.78.3-h16e383f_0
  libhwloc           conda-forge/win-64::libhwloc-2.9.3-default_haede6df_1009
  libiconv           conda-forge/win-64::libiconv-1.17-hcfcfb64_2
  libjpeg-turbo      conda-forge/win-64::libjpeg-turbo-2.1.5.1-hcfcfb64_1
  liblapack          conda-forge/win-64::liblapack-3.9.0-20_win64_mkl
  libogg             conda-forge/win-64::libogg-1.3.4-h8ffe710_1
  libpng             conda-forge/win-64::libpng-1.6.39-h19919ed_0
  libsodium          conda-forge/win-64::libsodium-1.0.18-h8d14728_1
  libssh2            conda-forge/win-64::libssh2-1.11.0-h7dfc565_0
  libtiff            conda-forge/win-64::libtiff-4.5.1-h6c8260b_1
  libvorbis          conda-forge/win-64::libvorbis-1.3.7-h0e60522_0
  libwebp-base       conda-forge/win-64::libwebp-base-1.3.2-hcfcfb64_0
  libxcb             conda-forge/win-64::libxcb-1.15-hcd874cb_0
  libxml2            conda-forge/win-64::libxml2-2.11.6-hc3477c8_0
  m2w64-gcc-libgfor~ conda-forge/win-64::m2w64-gcc-libgfortran-5.3.0-6
  m2w64-gcc-libs     conda-forge/win-64::m2w64-gcc-libs-5.3.0-7
  m2w64-gcc-libs-co~ conda-forge/win-64::m2w64-gcc-libs-core-5.3.0-7
  m2w64-gmp          conda-forge/win-64::m2w64-gmp-6.1.0-2
  m2w64-libwinpthre~ conda-forge/win-64::m2w64-libwinpthread-git-5.0.0.4634.697f757-2
  matplotlib-base    conda-forge/win-64::matplotlib-base-3.7.3-py39hf19769e_0
  matplotlib-inline  conda-forge/noarch::matplotlib-inline-0.1.6-pyhd8ed1ab_0
  mkl                conda-forge/win-64::mkl-2023.2.0-h6a75c08_50497
  msys2-conda-epoch  conda-forge/win-64::msys2-conda-epoch-20160418-1
  munkres            conda-forge/noarch::munkres-1.1.4-pyh9f0ad1d_0
  nest-asyncio       conda-forge/noarch::nest-asyncio-1.5.8-pyhd8ed1ab_0
  numpy              conda-forge/win-64::numpy-1.26.2-py39hddb5d58_0
  openjpeg           conda-forge/win-64::openjpeg-2.5.0-ha2aaf27_2
  packaging          conda-forge/noarch::packaging-23.2-pyhd8ed1ab_0
  parso              conda-forge/noarch::parso-0.8.3-pyhd8ed1ab_0
  pcre2              conda-forge/win-64::pcre2-10.42-h17e33f8_0
  pickleshare        conda-forge/noarch::pickleshare-0.7.5-py_1003
  pillow             conda-forge/win-64::pillow-10.0.0-py39ha9166d5_0
  platformdirs       conda-forge/noarch::platformdirs-4.1.0-pyhd8ed1ab_0
  ply                conda-forge/noarch::ply-3.11-py_1
  proj               conda-forge/win-64::proj-9.2.1-h660b3b0_0
  prompt-toolkit     conda-forge/noarch::prompt-toolkit-3.0.42-pyha770c72_0
  psutil             conda-forge/win-64::psutil-5.9.7-py39ha55989b_0
  pthread-stubs      conda-forge/win-64::pthread-stubs-0.4-hcd874cb_1001
  pthreads-win32     conda-forge/win-64::pthreads-win32-2.9.1-hfa6e2cd_3
  pure_eval          conda-forge/noarch::pure_eval-0.2.2-pyhd8ed1ab_0
  pygments           conda-forge/noarch::pygments-2.17.2-pyhd8ed1ab_0
  pyparsing          conda-forge/noarch::pyparsing-3.1.1-pyhd8ed1ab_0
  pyproj             conda-forge/win-64::pyproj-3.6.1-py39hd6181e6_0
  pyqt               conda-forge/win-64::pyqt-5.15.9-py39hb77abff_5
  pyqt5-sip          conda-forge/win-64::pyqt5-sip-12.12.2-py39h99910a6_5
  pyshp              conda-forge/noarch::pyshp-2.3.1-pyhd8ed1ab_0
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  python_abi         conda-forge/win-64::python_abi-3.9-4_cp39
  pywin32            conda-forge/win-64::pywin32-306-py39h99910a6_2
  pyzmq              conda-forge/win-64::pyzmq-25.1.2-py39h7eaf5a6_0
  qt-main            conda-forge/win-64::qt-main-5.15.8-h2c8576c_12
  qtconsole          conda-forge/noarch::qtconsole-5.5.1-pyhd8ed1ab_0
  qtconsole-base     conda-forge/noarch::qtconsole-base-5.5.1-pyha770c72_0
  qtpy               conda-forge/noarch::qtpy-2.4.1-pyhd8ed1ab_0
  sip                conda-forge/win-64::sip-6.7.12-py39h99910a6_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  stack_data         conda-forge/noarch::stack_data-0.6.2-pyhd8ed1ab_0
  tbb                conda-forge/win-64::tbb-2021.11.0-h91493d7_0
  toml               conda-forge/noarch::toml-0.10.2-pyhd8ed1ab_0
  tomli              conda-forge/noarch::tomli-2.0.1-pyhd8ed1ab_0
  tornado            conda-forge/win-64::tornado-6.3.3-py39ha55989b_1
  traitlets          conda-forge/noarch::traitlets-5.14.0-pyhd8ed1ab_0
  typing_extensions  conda-forge/noarch::typing_extensions-4.9.0-pyha770c72_0
  unicodedata2       conda-forge/win-64::unicodedata2-15.1.0-py39ha55989b_0
  wcwidth            conda-forge/noarch::wcwidth-0.2.12-pyhd8ed1ab_0
  xorg-libxau        conda-forge/win-64::xorg-libxau-1.0.11-hcd874cb_0
  xorg-libxdmcp      conda-forge/win-64::xorg-libxdmcp-1.1.3-hcd874cb_0
  zeromq             conda-forge/win-64::zeromq-4.3.5-h63175ca_0
  zipp               conda-forge/noarch::zipp-3.17.0-pyhd8ed1ab_0
  zstd               conda-forge/win-64::zstd-1.5.5-h12be248_0



Downloading and Extracting Packages
m2w64-libwinpthread- | 31 KB     | ############################################################################ | 100%
traitlets-5.14.0     | 107 KB    | ############################################################################ | 100%
libwebp-base-1.3.2   | 263 KB    | ############################################################################ | 100%
importlib-metadata-7 | 26 KB     | ############################################################################ | 100%
libsodium-1.0.18     | 697 KB    | ############################################################################ | 100%
python-dateutil-2.8. | 240 KB    | ############################################################################ | 100%
libdeflate-1.18      | 149 KB    | ############################################################################ | 100%
xorg-libxdmcp-1.1.3  | 66 KB     | ############################################################################ | 100%
pyparsing-3.1.1      | 87 KB     | ############################################################################ | 100%
jedi-0.19.1          | 822 KB    | ############################################################################ | 100%
platformdirs-4.1.0   | 20 KB     | ############################################################################ | 100%
lerc-4.0.0           | 190 KB    | ############################################################################ | 100%
unicodedata2-15.1.0  | 365 KB    | ############################################################################ | 100%
glib-tools-2.78.3    | 141 KB    | ############################################################################ | 100%
pickleshare-0.7.5    | 9 KB      | ############################################################################ | 100%
krb5-1.20.1          | 701 KB    | ############################################################################ | 100%
pywin32-306          | 5.5 MB    | ############################################################################ | 100%
openjpeg-2.5.0       | 232 KB    | ############################################################################ | 100%
brotli-bin-1.1.0     | 20 KB     | ############################################################################ | 100%
pyqt-5.15.9          | 3.7 MB    | ############################################################################ | 100%
executing-2.0.1      | 27 KB     | ############################################################################ | 100%
libglib-2.78.3       | 2.5 MB    | ############################################################################ | 100%
typing_extensions-4. | 35 KB     | ############################################################################ | 100%
jupyter_client-8.6.0 | 103 KB    | ############################################################################ | 100%
liblapack-3.9.0      | 4.8 MB    | ############################################################################ | 100%

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Finally, I start the jupyter qtconsole, and it does not crash, see the screenshot below:

(nept) C:\Users\vic>jupyter qtconsole
QObject::startTimer: Timers can only be used with threads started with QThread

image

I may try later with Miniforge on Linux 64-bit too. In the meantime, may I ask you to provide a full traceback of all your steps? Maybe we can see there the discrepancy between your environment and mine. This kind of segfaults I got them in the past when mixing conda-forge and anaconda channels (I think it is because numpy is packaged differently).

If the issue at hand is C library conflicts, that requires two packages both requiring the same C library, but vendoring/shipping different versions of it. I can see raising the issue here to get help re-compiling basemap with whatever version of geos the other library uses, but that doesn't seem to be what you're after.

Since the problem as stated is that conda is installing an invalid environment, might I ask why you did not move the issue to the conda repo? There is a decent chance conda is doing the best it can with the information it has, in which case, have you tried raising this issue with the conda-forge maintainers and asking them to use the same version of geos for building basemap and the other package?

Here's where conda-forge declares basemap needs geos to build, though it looks like it specifies that the geos version installed at runtime must match that used at build time, so conflicts would be on the other package pulling in geos (presumably without that specification). It sounds like you think qtconsole is the other package that depends on geos, but it looks like the only C library qtconsole directly depends on is python. Of the other packages installed in the log on the previous post, the only ones that look likely to link against geos are dependencies of basemap (build dependencies, even).

If you're just looking for workarounds, have you checked the versions of the installed packages on the working version, then attempted to install exactly those versions (except for the different python, since you want that to be 3.9)? There is an excellent chance this won't work, but using <${version} instead of ==${version} might. What about the other way around? Does installing the package versions used by the broken installation with the newer python fix things?

I'm not seeing any obvious reason you can consistently crash qtconsole while everyone helping you can run qtconsole just fine, so could you try installing just basemap (no qtconsole) and seeing if that produces decent plots in the normal python console, then just qtconsole (without basemap) to try your test, then qtconsole and matplotlib (still no basemap), and seeing which versions cause problems?

What does pip list --user show? Is there anything there that would have a different version of geos than that used for the py39 build of basemap?

I'm suspecting you haven't set LD_PRELOAD, but echo "${LD_PRELOAD}" could check that. Does it mention a libgeos.so*? What of your LD_LIBRARY_PATH, is there a directory with a libgeos.so* before the conda environment's lib directory (echo "${LD_LIBRARY_PATH} | tr ':' '\n')?

Perhaps I am missing something. Could you explain why you think "the underlying issue with basemap support is the build process for libgeos"? I do remember libgeos conflicts causing problems, when two packages that link against geos bundled it as part of their wheels, but you're using conda, not pip, and the tools to avoid that problem have gotten better in the last decade.

Do other jupyter front-ends (jupyter console and jupyter notebook) cause the same problem? What about using the QtAgg or QtCairo backends for matplotlib when creating a figure using basemap?

Out of curiousity, what version of conda are you using? conda env remove nept -y doesn't work for me (with conda 23.11) unless I add -n before nept. What happens if you try running conda clean -a between deleting the old environment and creating the new one?

Hi I was able to solve this issue by reinstalling conda and cleaning its installation first. Sorry for not replying sooner.

I recall made a number of mistakes mixing repos from pip and the conda forge install which I think made it harder to debug.