As a solution for this I'll recount my experience. I'm currently running OSX and needed to tile some geoTiffs. I noticed that my existing GDAL installation didn't have gdal2tiles so I opted to use the python library gdal2tiles. The execution was a little different and out of the box requires you to create a python script to run gdal2tiles.generate_tiles(...)
The generated html pages are really outdated and borderline useless, so I'd suggest creating your own previewer with Leaflet following the instructions here
I'd also suggest using virtual environments with python which allows you to install libraries for specific projects instead of globally. Here's some instruction on this too https://docs.python.org/3/library/venv.html
Hopefully this helps.