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

Remove the need for the GDAL_DATA environment variable #35

Closed
pelson opened this issue Apr 14, 2016 · 6 comments
Closed

Remove the need for the GDAL_DATA environment variable #35

pelson opened this issue Apr 14, 2016 · 6 comments

Comments

@pelson
Copy link
Member

pelson commented Apr 14, 2016

It is causing us to have to workaround the problem elsewhere, and would be nice to avoid if possible (even if it means a patch).

Not a huge priority, but it would be helpful to keep a list of places that the GDAL_DATA information has leaked out of this feedstock:

@gillins
Copy link
Contributor

gillins commented Apr 14, 2016

Do we know why this isn't set in the _test environment? Should it be fixed in conda instead?
There must be other packages that have the same problem (ie requiring an environment variable to be set).

@ocefpaf
Copy link
Member

ocefpaf commented Apr 14, 2016

Do we know why this isn't set in the _test environment? Should it be fixed in conda instead?

I just checked a fresh install and I notice that we have a bug

conda create --name GDAL --channel conda-forge python=2.7 gdal=1.11.4
source activate GDAL
echo $GDAL_DATA
/home/filipe/miniconda/pkgs/libgdal-2.0.0-0/share/gdal

That directory does not exist. I will take a closer look at this.

@gillins
Copy link
Contributor

gillins commented Apr 15, 2016

Seems fine for me. Do you have $GDAL_DATA set outside of Conda? The activate script won't change it if you have (perhaps it should?).

@ocefpaf
Copy link
Member

ocefpaf commented Apr 15, 2016

Do you have $GDAL_DATA set outside of Conda?

Nope. As you can see installed gdal=1.11.4, but the env var is pointing to libgdal-2.0.0.

@gillins
Copy link
Contributor

gillins commented Apr 16, 2016

On my machine I get a different result:

conda create --name GDAL1 --channel conda-forge python=3.5 gdal=1.11.4
source activate GDAL1
echo $GDAL_DATA
/home/sam/miniconda3/envs/GDAL1/etc/conda/activate.d/../../../share/gdal
conda create --name GDAL2 --channel conda-forge python=3.5 gdal=2.0.2
source activate GDAL2
echo $GDAL_DATA
/home/sam/miniconda3/envs/GDAL2/etc/conda/activate.d/../../../share/gdal

Which seems correct, so that's why I was wondering if you had $GDAL_DATA set elsewhere maybe in your ~/.bashrc?

@ocefpaf
Copy link
Member

ocefpaf commented Apr 16, 2016

Which seems correct, so that's why I was wondering if you had $GDAL_DATA set elsewhere maybe in your ~/.bashrc?

I was going to answer: I never set variables in my ~/.zshrc! But it seems that I forgot this

export GDAL_DATA=$HOME/miniconda/pkgs/libgdal-2.0.0-0/share/gdal

since last SciPy and the geo-processing tutorial!

So... Sorry 😳

@pelson I guess GDAL is OK setting the env var. The problem is really conda and the _test env.

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

No branches or pull requests

3 participants