Ran into this error while trying to create a shapefile layer for training sites in an object segmentation project. This is an issue with QGIS itself, as I tried to create new vector layers on previous projects and got the same error.
I did edit some path variables while trying to connect QGIS to an external python interpreter, and I suspect my issues stem from that based on navigating to Settings > "Options > Environment > Current environment variables (read-only - bold indicates modified at startup)". There was a custom PATH variable that I had set earlier in my ~/.bash_profile and commented out, but clearly it still exists according to Q.
For anyone experienced in customizing environment variables, is there a simple solution to this problem? I'm only just starting to become familiar with customization but I've surely bungled something up along the way.