Skip to content

[BUG]: (necessity of gdal related lines in setup.py especially for windows installation?) #456

Description

@Sadrim-71

Firstly I should thank every efforts behind this exciting python library.

but it seems that installation process is not as easy as it seems.

A bug which is sometimes reported by the users is that gdal is installed and when they run "pip install ." an error raises about gdal which says it should be installed for Solaris. and when the user checks the installed packages, surprisingly gdal is available in the list.

when I investigated setup.py in details, I figured out the problem is due to an environment variable named gdal-config.
based on gdal documentation, gdal-config is an utility script available on UNIX systems which can be used to determine various information about a GDAL installation.
https://gdal.org/programs/gdal-config.html#

try:
gdal_version = subprocess.check_output(
['gdal-config', '--version']).decode('utf')
gdal_config = os.environ.get('GDAL_CONFIG', 'gdal-config')

except Exception:
sys.exit("GDAL must be installed to use solaris. See the documentation "
"for more info. We recommend installing GDAL within a conda "
"environment first, then installing solaris there.")

besides, I didn't see any usage of above lines except only checking of GDAL being installed.
and we can make sure that gdal is installed by other ways like import gdal/ from osgeo import gdal and if nothing happens it means that gdal is installed.

so I think those lines can be commented out and then running pip install . would be done without any exception.

if my conclusion is correct please verify me.

thanks alot

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions