I just switched from MacPorts to HomeBrew. After installing all the required XCode versions and other software I tried installing python using homebrew: I think it successfu
I use these commands to solve it.
mkdir /usr/local/lib mkdir /usr/local/lib/pkgconfig brew link python