A Python script of mine is failing with:
Traceback (most recent call last):
File \"./inspect_sheet.py\", line 21, in
main()
File \"./i
I had this problem on MacOS with python 2 and 3 installed via brew. It turns out that brew uninstalling python and python@2 does not remove any libraries which were installed for those versions of python; i.e. in:
/usr/local/lib/python3.7/site-packages/
and
/usr/local/lib/python2.7/site-packages/
Something in there was not right, so what worked for me was to delete/move all the installed libraries for brew's python 2 and 3 and start again (and make sure only to use virtualenvs from here on):
brew uninstall --ignore-dependencies python@2
brew uninstall --ignore-dependencies python
sudo mv /usr/local/lib/python3.7 ~/python3.7libs-backup
sudo mv /usr/local/lib/python2.7 ~/python2.7libs-backup
brew install python
brew install python@2