Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasterio pulls in package that needs libnsl.so #14

Closed
MichaelTiemannOSC opened this issue Sep 26, 2021 · 2 comments
Closed

rasterio pulls in package that needs libnsl.so #14

MichaelTiemannOSC opened this issue Sep 26, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MichaelTiemannOSC
Copy link
Contributor

Describe the bug
An attempt to use rasterio in the SciPy notebook results in a dependency on the missing file libnsl.so.1. This problem has been noted for 2+ years:

conda-forge/fiona-feedstock#138 (comment)

I am independently trying to understand why this does not fail in the other notebook contexts (which give me other problems relating to rebuilding jupyter lab). I suspect that the large number of SciPy packages shift the center of gravity of conda's dependency resolution over the tipping point and it makes poor choices with its flexible solve.

To Reproduce
Steps to reproduce the behavior:

  1. Create a SciPy notebook
  2. Open a terminal window to create a conda environment (rooted at /opt/app-root/miniconda3)
  3. Enter conda base environment by switching to bash shell
  4. Initialize environment with these commands:
#!/bin/bash

# Enable selection of 'base' kernel
conda install -c conda-forge nb_conda_kernels --yes

# Base packages for Physical Risk map reading and writing
# Note this takes a really long time to solve
#      due to large number of packages in SciPy
#      that need to be re-based on Python 3.8 and such
conda install -c conda-forge geopandas rasterio ipyleaflet --yes

# Activate the ipyleaflet extensions where we can see them
# Check Edit->nbextensions config menu item to see that ipyleaflet extension is visible
jupyter nbextension install ipyleaflet --user --py
jupyter nbextension enable ipyleaflet --user --py```

In a notebook execute this:

`import rasterio`

**Expected behavior**
It is expected that the rasterio will be imported

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
This is the error message:

ImportError Traceback (most recent call last)
/tmp/ipykernel_9765/883309545.py in
----> 1 import rasterio

/opt/app-root/miniconda3/lib/python3.8/site-packages/rasterio/init.py in
7 from pathlib import Path
8
----> 9 from rasterio._base import gdal_version
10 from rasterio.drivers import driver_from_extension, is_blacklisted
11 from rasterio.dtypes import (

ImportError: libnsl.so.1: cannot open shared object file: No such file or directory

@MichaelTiemannOSC MichaelTiemannOSC added the bug Something isn't working label Sep 26, 2021
@MichaelTiemannOSC
Copy link
Contributor Author

I've also filed this: conda-forge/rasterio-feedstock#220

@MichaelTiemannOSC
Copy link
Contributor Author

This problem does not affect the PyPi version of rasterio, which we can easily use for the Elyra notebook. The python-feedstock people are working on a fix for conda-forge, which is Not Our Problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant