You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyrosar works properly with snap 10. However, if I install pyroSAR directly from pip (pip install pyroSAR), I get the last version according to my pip list, but I get this error:
_/preprocess.py", line 4, in
from pyroSAR.snap import geocode
File "/usr/local/lib/python3.10/site-packages/pyroSAR/init.py", line 1, in
from .drivers import *
File "/usr/local/lib/python3.10/site-packages/pyroSAR/drivers.py", line 51, in
from . import S1, patterns
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/init.py", line 3, in
from .auxil import OSV, removeGRDBorderNoise
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/auxil.py", line 29, in
from . import linesimplify as ls
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/linesimplify.py", line 17, in
from spatialist.ancillary import rescale
File "/usr/local/lib/python3.10/site-packages/spatialist/init.py", line 4, in
from . import raster
File "/usr/local/lib/python3.10/site-packages/spatialist/raster.py", line 23, in
from osgeo import gdal, gdal_array, osr
File "/usr/local/lib/python3.10/site-packages/osgeo/gdal_array.py", line 13, in
from . import _gdal_array
ImportError: cannot import name 'gdal_array' from 'osgeo' (/usr/local/lib/python3.10/site-packages/osgeo/init.py)
GDAL is a tricky one to handle with the pip installation. One can install the gdal pip package but it won't work out pf the box because the C/C++ library is not installed automatically. This is why using conda/mamba is a lot easier.
Thanks @johntruckenbrodt ,
My installation was almost the same: pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
Changing to --global-option="$(gdal-config --cflags)" made the difference, and now it works :)
Hi @johntruckenbrodt,
I'm experiencing a problem, regarding the installation we have just talked about in issue #304. When installing the latest version from git:
RUN apt-get update && \ apt-get install git -y && \ pip install git+https://github.com/johntruckenbrodt/pyroSAR.git && \
Pyrosar works properly with snap 10. However, if I install pyroSAR directly from pip (
pip install pyroSAR
), I get the last version according to my pip list, but I get this error:_/preprocess.py", line 4, in
from pyroSAR.snap import geocode
File "/usr/local/lib/python3.10/site-packages/pyroSAR/init.py", line 1, in
from .drivers import *
File "/usr/local/lib/python3.10/site-packages/pyroSAR/drivers.py", line 51, in
from . import S1, patterns
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/init.py", line 3, in
from .auxil import OSV, removeGRDBorderNoise
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/auxil.py", line 29, in
from . import linesimplify as ls
File "/usr/local/lib/python3.10/site-packages/pyroSAR/S1/linesimplify.py", line 17, in
from spatialist.ancillary import rescale
File "/usr/local/lib/python3.10/site-packages/spatialist/init.py", line 4, in
from . import raster
File "/usr/local/lib/python3.10/site-packages/spatialist/raster.py", line 23, in
from osgeo import gdal, gdal_array, osr
File "/usr/local/lib/python3.10/site-packages/osgeo/gdal_array.py", line 13, in
from . import _gdal_array
ImportError: cannot import name 'gdal_array' from 'osgeo' (/usr/local/lib/python3.10/site-packages/osgeo/init.py)
Originally posted by @vchaparro in #304 (comment)
The text was updated successfully, but these errors were encountered: