I created a new conda
environment with python version 3.7
Then installed
conda install -c conda-forge gdal=2.4
Then installed gdal2tiles
pip install gdal2tiles
and then python test.py
#test.py
import gdal2tiles
gdal2tiles.generate_tiles('xyz.tif', 'output_dir')
but I am getting an error
AttributeError: module 'gdal2tiles' has no attribute 'generate_tiles'
It's the same method that I copied from the documentation but doesn't seem to work. https://pypi.org/project/gdal2tiles/