I'm using IDLE. GDAL command works in QGIS' Python console but not Python 2.7 (ArcMap) and 3.8 (separate install) IDLEs.
So far, I have tried
- Downloading this (GDAL/OGR IN PYTHON) and following the instructions in the README text file. Did not work.
- Looked at the GDAL releases here (Stable Releases) but there is no GDAL release for Python 3.8.1 MSCv 1916. I followed this article (Installing GDAL for Windows) for this step.
- Installed GDAL through the OSGEO4W installer but when I ran a code with this line, it did not work for Python 2.7 and 3.8 (but worked in QGIS python console)
from osgeo import ogr