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

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

Open
Sadrim-71 opened this issue Mar 31, 2022 · 0 comments

Comments

@Sadrim-71
Copy link

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

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

No branches or pull requests

1 participant