Homebrew python3 not linked anymore (Xcode 12.4.x stack)

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
vagrant@prd-atl-elt-b-xcode-12-4-210222130214-MxQmG35vapZyhmqGLCjFgQ ~ % which -a pip3

It looks like that Homebrews python@3.9 isn’t linked to /usr/local/bin/python3 anymore.


We currently added brew link --overwrite python@3.9 to our workflows as a workaround.

Hi @steffenm! :wave:
I am sorry you ran into this issue.

We’ve also noticed an issue regarding python3 on Monday. I see you submitted this issue 2 days ago, and since we released a hotfix on Monday, I was wondering if you are still seeing this?

Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.