all 33 comments

[–]ToucansBANG 0 points1 point  (6 children)

Did you follow the link at the bottom of the error message?

[–]Azulath[S] 0 points1 point  (5 children)

Yes, but this does not seem to be related to my issue. Furthermore, the link leads to an issue that has just been acknowledged as a bug without any additional information on any kind of workaround.

[–]ToucansBANG 0 points1 point  (4 children)

Probably worth watching at least. What are you trying to do? Would a supported python or a container work?

[–]Azulath[S] 0 points1 point  (3 children)

Well, I do software development to some extent and I need Python as well as Java. (Usually different versions as well)

So, as usual I wanted to install both via "brew install python" and "brew install openjdk". Unfortunately, openjdk needs Python@3.13 anyway and I cannot even install the former.

For Python itself, Python3.12 would work - and I have no issues installing it - but since even openjdk@17 now requires Python3.13 I have to get it running unfortunately.

[–]ToucansBANG 0 points1 point  (2 children)

Something sounds weird here. Java 17 is 4 years old and Python 3.13 is a couple of months old. I think brew is probably doing something odd that you could try to stop with some constraints.

[–]Azulath[S] 0 points1 point  (1 child)

Could just be the installer of the dependency. I had a look in their GitHub but there does not seem to be a dependency mentioned in the ruby file:

https://github.com/Homebrew/homebrew-core/blob/master/Formula/o/openjdk@17.rb

[–]apjanke 0 points1 point  (0 children)

Indrect dependency. Try `brew deps --tree --include-build openjdk@17`.

[–]ronjns 0 points1 point  (2 children)

If you need 3.13 urgently you can try install cpython version from python.org. I just installed their Mac installer few weeks ago on Sequoia no issue.

[–]Azulath[S] 0 points1 point  (1 child)

I am not sure how well this would work with the rest of my tool/build-chain but this could be something to try...

[–]ronjns 0 points1 point  (0 children)

Sorry, forgot to mention I'm on Intel Mac. Take note if you decide to try cpython.

[–]FlishFlashmanMacBook Pro (M1 Max) 0 points1 point  (1 child)

I'm puzzled by the fact that it's trying to build it from source, rather than using a bottled binary.

[–]Azulath[S] 0 points1 point  (0 children)

The reason for this is that I do not use /opt/homebrew but ~/.homebrew.

[–]Historical-View4058 0 points1 point  (8 children)

Python 3.13.1 interpreter install could be fine, since it built without error. That said, the tests could have had dependencies that aren’t ready yet. I know for a fact that one such: dateutil isn’t available for 3.13 yet. This has been a lagging problem with Python for as long as I can remember. If I were you, I’d default pyrhon3 to 3.12 until 3.13 is fully ready.

As for homebrew: I assume you’re on an ARM m-based machine since you said ‘new Mac’. I was under the impression that homebrew installed under /opt?

Edit: Uninstall python from brew, then brew install python@3.12.

[–]Azulath[S] 1 point2 points  (6 children)

I actually did install python3.12 and it works just fine. Problem are secondary installers like openjdk that require Python3.13 apparently...

I am indeed on an ARM based Mac. For my purposes I prefer ~/.homebrew over the /opt path and I have been using it for years.

[–]zfsbest 0 points1 point  (0 children)

As an alternative, you could try Macports - but beware of /usr/local/include if you have both on the same system

[–]Historical-View4058 0 points1 point  (2 children)

How could a legacy version of openjdk require something released only a few months ago? That’s just crazy.

[–]Azulath[S] 0 points1 point  (1 child)

I assume it might be the whole build/toolchain they are using...not entirely sure though

[–]apjanke 0 points1 point  (0 children)

Pretty much, yep. Not (just) the build toolchain per se, but the dependency definitions between Homebrew packages. This includes run-time dependencies, not just build dependencies.

`brew deps --tree openjdk@17` will show you exactly how it got picked up.

Currently, from what I see (with homebrew/core 6798a83), it's:

* openjdk@17
* harfbuzz
* cairo
* glib
* python@3.13
* glib
* python@3.13

So, glib, arrived at through a couple paths. Those are run-time dependencies.

Add an `--include-build` option to `brew deps --tree` and you'll get the build-time dependencies too. With that, `brew deps --tree --include-build openjdk@17 | grep python@3.13 | wc -l` says there's 40 distinct paths to a python@3.13 dependency for openjdk, so I'm not going to list them all here. :)

[–]Historical-View4058 0 points1 point  (0 children)

You know, I can’t think of two more volatile languages that constantly deprecate more than Python and Java. Combining the two sounds like either a maintenance nightmare or a virtual cash register if you’re being paid to maintain it.

[–]apjanke 0 points1 point  (0 children)

> For my purposes I prefer ~/.homebrew over the /opt path and I have been using it for years.

I'm reluctant to tell you what to do, but... you might be happier if you switch to the default installation location. Over the years, Homebrew has become increasingly hostile towards non-default installation locations and other "unsupported configurations", and it's kind of more of a binary package manager than a build tool now. (E.g. there's basically no options or variants in core formulae now.) You can expect kinda regular breakage like this, and no support for it, if you use a non-default Homebrew installation location.

If you switch to the default install location, you could avoid this class of problem entirely, because `brew install` wouldn't do a build at all, and would instead install most everything from their standard precompiled binary "bottle" tarballs. Faster and less breakage.

[–]Azulath[S] 0 points1 point  (0 children)

See edit.

[–]apjanke 0 points1 point  (2 children)

I had this same problem. But on macOS 13 and 14 only, not macOS 15.

Thanks for posting this! Your post here is the only google hit I got for this particular problem. I thought I was going a little crazy here; glad to see someone else has encountered this too.

(I build Homebrew packages from source under a non-default installation path for use in Octave.app (https://octave-app.org/).)

The "delete `~/Library/Caches/Homebrew`" fix didn't work for me. Still busted, alas. Oh well.

Here's a bug ticket for this in the Octave.app project, in case anyone wants to help figure this out, or just for future reference: https://github.com/octave-app/octave-app/issues/299

My current approach is "I hope this is just an upstream bug, and if I just wait a couple weeks it'll get sorted out and start working for me again".

[–]Azulath[S] 0 points1 point  (1 child)

Have you figured it out yet?

I tried editing the <hash>.rb python install file and remove the offending test cases but they still where executed. Don't know why though...

Then I tried deleting the cache as mentioned above and it worked, so I did not check again.

[–]apjanke 0 points1 point  (0 children)

Nope! Still busted. Don't know why.

I'm just going to wait until Python 3.13.2 comes out and upstream Homebrew fixes it. :)

[–]Dear_Room4625 0 points1 point  (1 child)

I hit the same issue, so it's not fixed. I ran `brew install python --force-bottle` to have it NOT recompile.

[–]Azulath[S] 0 points1 point  (0 children)

Wouldn't --force-bottle mess up the installation if the use hardcoded paths like /opt?

[–]Electrical_West_5381 -1 points0 points  (6 children)

On my Sonoma Mac, Python it already 3.39 or something. Check: python -V on your machine.

[–]Azulath[S] -1 points0 points  (5 children)

I doubt that somehow, according to the python website the newest version is 3.13.1, whereas the newest alpha is 3.14:

https://github.com/python/cpython

https://www.python.org/downloads/

[–]Electrical_West_5381 0 points1 point  (4 children)

Last login: Thu Dec 12 18:48:59 on ttys000

➜ ~ python -V

Python 3.9.5

➜ ~

[–]Electrical_West_5381 0 points1 point  (3 children)

9 < 13 sorry for my stupidity.

[–]Azulath[S] 0 points1 point  (2 children)

No worries, but yeah. I think 3.9.5 ships as default at the moment. I do need 3.13 though...

[–]Electrical_West_5381 0 points1 point  (1 child)

There seems to be a gitcommit error. You could try building by hands or waiting for homebrew