Reputation: 310
I want to install GDAL in an Anaconda environment along with Pytorch. I am using Ubuntu 18.04 LTS
I tried 3 versions of Anaconda (2019.03, 2019.07, 2020.11).
I followed the advice mentioned in previous questions - like ensuring that channel priority has been set to strict and using conda-forge
channel explicitly (conda install gdal -c conda-forge
).
I tried installing an earlier version of python (python 3.5, 3.6 etc) in the environment and then installing anaconda and then installing gdal.
Sometimes I also tried fresh Anaconda installations and didn't work.
In all of the permutations I tried, I had one of the following problems:
ImportError: libcharset.so.1: cannot open shared object file: No such file or directory"
I have been stuck with this for the past 3 days and will be really grateful if I could get some pointers on how to install Anaconda + GDAL + Pytorch.
Upvotes: 1
Views: 756
Reputation: 1
You can install an old version:
conda create -n gdal_env python=3.6 gdal
Upvotes: 0
Reputation: 310
I found out from another post that the following commands might help:
sudo apt-get install libgdal-dev
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
Also, It turns out that setting channel_priority
to strict
resulted in version conflicts (conda config --set channel_priority false
).
Upvotes: 1