I cant install the rasterio python package in my repl.
this is the error message I get:
Traceback (most recent call last):
File “main.py”, line 1, in
import rasterio
File “/home/runner/rasteriotest/venv/lib/python3.10/site-packages/rasterio/init.py”, line 28, in
from rasterio._version import gdal_version, get_geos_version, get_proj_version
ImportError: libexpat.so.1: cannot open shared object file: No such file or directory
This is what ghostwriter suggest, but I have not access to sudo:
The error is an import error caused by a missing dependency for rasterio library on line 1 of main.py. It seems that the system is missing the ‘libexpat’ shared library. To fix this, you will need to install ‘libexpat’ shared library.
On Ubuntu or Debian, you can install the library by running the following command:
sudo apt-get install -y libexpat-dev
On CentOS or RedHat, you can install the library by running the following command:
sudo yum install expat-devel
Once you have installed the ‘libexpat’ shared library, try running the code again.
It’s possible it thinks rasterio is installed when it isn’t; you could try poetry remove rasterio and pip uninstall rasterio to be safe, then re add it poetry add rasterio.