Starting today we expirence the issue that python3 and pip3 are two different python versions. This causes a “ModuleNotFoundError” when importing a package installed with pip3.
pip3 installes the packages to /usr/local/lib/python3.9/site-packages
but python3 is looking for packages in /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
which
output:
vagrant@prd-atl-elt-b-xcode-12-4-210222130214-MxQmG35vapZyhmqGLCjFgQ ~ % which -a python3
/usr/bin/python3
vagrant@prd-atl-elt-b-xcode-12-4-210222130214-MxQmG35vapZyhmqGLCjFgQ ~ % which -a pip3
/usr/local/bin/pip3
/usr/local/bin/pip3
/usr/bin/pip3
It looks like that Homebrews python@3.9 isn’t linked to /usr/local/bin/python3 anymore.
Workaround
We currently added brew link --overwrite python@3.9
to our workflows as a workaround.