Skip to content

Patch pytensor on macos - #14

Merged
Thematiq merged 1 commit into
MLCIL:masterfrom
asiomchen:note-for-macos-users
Oct 7, 2026
Merged

Thematiq merged 1 commit into
MLCIL:masterfrom
asiomchen:note-for-macos-users

Conversation

@asiomchen

Copy link
Copy Markdown
Contributor

As I discovered during the RDkit UGM workshop the library is broken when pip-installed on MacOS and the native clang++ shipping with Xcode 27 or newer is used.
Compilation fails and disabling the compilation leads to very long execution time.

The proposed fix solves the upstream PyTensor issue (pymc-devs/pytensor#2268) by patching the flags passed to the clang++.

The devs apparently had some issues with new macOS linker - I have no experience to judge this, but omitting -ld64 flag works fine on my machine and all the testes are green.

Alternative solution will be to use conda environment with compilers installed but I guess most people will prefer to use normal venvs anyway.
Also in my test patched version in venv is running tests faster then the same tests in the conda env (70s vs 90s).

@asiomchen
asiomchen requested a review from Thematiq as a code owner September 21, 2026 13:55
@Thematiq
Thematiq merged commit 4d4f0bd into MLCIL:master Oct 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants