I was having trouble installing QGIS plugins because I kept hitting ModuleNotFoundError: No module named 'gdal'
Here's how I solved it
- QGIS -> Preferences -> System
- See "Current environment variables" window
- Note the path that is called PYTHONHOME (mine was /Applications/QGIS-LTR.app/Contents/MacOS )
- Open terminal
- Look for gdal using
find /Applications/QGIS-LTR.app/Contents -type f -name "gdal.*"
- Note location. Mine was: `/Applications/QGIS-LTR.app/Contents/Resources/python/site-packages/GDAL-3.2.1-py3.8-macosx-10.13.0-x86_64.egg/osgeo/gdal.py