0

I am trying to install GDAL (Geospatial Data Abstraction Library) version 3.4 or higher in a Python virtual environment on Ubuntu 20.04 LTS. I have followed the solution provided in this Stack Overflow post: Install GDAL on LINUX Ubuntu 20.04.4LTS for python. However, despite following the steps, I still end up with GDAL version 3.0.4 instead of the desired version.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gdal-bin/focal,now 3.0.4+dfsg-1build3 amd64 [installed]
gdal-data/focal,focal,now 3.0.4+dfsg-1build3 all [installed,automatic]
libgdal-dev/focal,now 3.0.4+dfsg-1build3 amd64 [installed]
libgdal26/focal,now 3.0.4+dfsg-1build3 amd64 [installed,automatic]
python3-gdal/focal,now 3.0.4+dfsg-1build3 amd64 [installed]

Environment:

Ubuntu 20.04 LTS
Python 3.8
PyCharm (with a virtual environment)

When I then do: pip install gdal==3.0.4

I get the following error: error in GDAL setup command: use_2to3 is invalid. [end of output]

  • 1
    Try downgrading setuptools `pip install setuptools==58` https://stackoverflow.com/questions/69100275/error-while-downloading-the-requirements-using-pip-install-setup-command-use-2 – FlyingTeller Jul 14 '23 at 14:11

0 Answers0