Building Julia on Mac: python not found

Running make results in

xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

command line developer tools had been installed, but on getting prompt I downloaded it (again) to be on the safe side, which didn’t help. The problem apparently was my system was configured to use homebrew Python, and we (I and Gemini) tried to get around, among other things:

  • adding a line into make.user, redirecting to one of the Pythons (either the system Python 3.9.6, or homebrew Python 3.13.3)
  • setting environment directly in the terminal by calling PYTHON=/usr/local/bin/python make -j8
  • creating a link pointing to python
  • … and more in that kind

For the link pointing to python, it’s what I have now:

elk@Mac julia % ls -l /usr/local/bin/python          
lrwxr-xr-x  1 root  wheel  16 Nov  7 12:14 /usr/local/bin/python -> /usr/bin/python3
elk@Mac julia % /usr/local/bin/python 
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

I.e. call to /usr/local/bin/python apparently being intercepted by the system.

Any ideas? Upgrade from MacOS 15.7 to the MacOS 26 as the last resort :wink: ?

For the moment, I performed the build and tests on an old Ubuntu machine, just it is much slower than my M4 Mac.

I have

which python3
/opt/homebrew/bin/python3

As far as building, you’re probably much better off with installing via juliaup, unless you have a particular reason to build.

FWIW: Upgrading to Tahoe was painless except for figuring out that I had to repair some of my Bluetooth devices.

Thank you :slightly_smiling_face:

Surely, I have (or, actually, had) a particular reason, which was preparing a PR for a stdlib.

Do I understand you correctly, that you are able to build Julia? If yes, what do you get here:

elk@Mac ~ % which python
python: aliased to python3

No, I hadn’t tried. Here is what I would have to do to alias python to python3.

which python
python not found
alias python=/opt/homebrew/bin/python3
which python
python: aliased to /opt/homebrew/bin/python3

So, now I have downloaded the source and compiled successfully. I saw nothing related to python. I’ve got a REPL, so far tests have passed except for replcompletions.jl and precompile.jl.

1 Like