-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Compatibility Issue for pytensor on macOS 15.4 #1342
Comments
|
Revise: pytensor version: 2.28.3 (latest for PyMC from conda-forge) |
Facing this issue as well, I suspect it's related to command line tool v16.3. Interestingly, this issue only seems to happen within VSCode environment and does not affect when I run in terminal. Previously it was working on VSCode terminal, but now it failed even in VSCode terminal. mmm UPDATE: # failing PATH
/opt/homebrew/Caskroom/miniforge/base/envs/pymc/bin:/opt/homebrew/Caskroom/miniforge/base/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/ling/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand
# working PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/ling/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/opt/homebrew/Caskroom/miniforge/base/envs/pymc/bin:/opt/homebrew/Caskroom/miniforge/base/condabin |
THX! @lingjie00 I have also tested the solutions following @lingjie00 's suggestions. For now, I think PyMC/PyTensor compilation failures on macOS 15.4 were caused by using conda-installed clang++ instead of the system compiler. The conda version created incompatible LTO library links. So one of my suggested solution (simpler) is as follows:
Key Fix: Forcing the environment to use macOS system compilers instead of conda's versions resolves LTO linking issues. This solution worked consistently across VSCode and terminal after PATH adjustments! 😃 |
Reopening because users will keep seeing this problem |
@maresb do you know if there's any open issue on conda related to clang? |
I had a look and I didn't find any recent relevant issues around conda. I did find this SO post by @corneliusroemer and this Discourse thread about this same issue. I see that I don't use Mac, so I don't have any good way to test myself. Would anyone else be able to test if installing |
THX for @maresb's reply and suggestions. I have tried, as you advised, installing |
Thanks @astrokang for the quick answer! Is the error message still |
Yes, the same problem again @maresb :
Here is my setup workflow:
and the setup details within the conda environmen:
|
Thanks so much @astrokang for all the detail! I see that llvmdev provides a symlink I can think of two likely hypotheses off the top of my head:
I'm no expert in C compilation, but depending on how adventurous you're feeling, you might be able to figure out the command it's running, and find a minimal example that's independent of PyTensor that we could submit to the conda-forge feedstock. |
Many thanks to @corneliusroemer for raising the visibility of this issue by posting it to the conda-forge zulip! |
I suspect that this is an activation issue. I received another report that this works on JupyterLab but not VS Code. I bet one of two things is going on:
It would be helpful if you could report:
|
THX for @maresb's more information! I'm using VS Code as my IDE. However, I have run the same code in JupyterLab, and it also throws the same error. So I would like to confirm: under what exact environment configuration does it work in the reported JupyterLab, as you mentioned? 👀 For your suggestions, I checked the environment variables using
and it returns:
So, it seems the Conda environment is properly activated in VS Code:
However, I do not see any To further rule out IDE-specific issues, I also checked the environment variables in JupyterLab. Here are some relevant parts of
So it seems both environments are correctly set up, yet the issue persists. Let me know if you need any more tests—I’m happy to help! 😃 |
I have had the exact same issue, coming from issue #1347 I'm using VS Code. The issue arises with both regular CONDA_DEFAULT_ENV: prob |
Describe the issue:
After updating to macOS 15.4, I encountered a failure when running pymc with pytensor. The error seems to be related to constant folding during graph optimization and LTO (Link Time Optimization) issues during compilation. I don't know. But I have tested that this issue does not occur on macOS 14.x.
Reproduceable code example:
Error message:
PyMC version information:
Environment
• macOS version: 15.4
• Python version: 3.13 (inside Conda environment)
• pytensor version: (latest from conda-forge)
• pymc version: 5.21.1
Context for the issue:
I have successfully run my code just a week before, but now it has failed, just after I updated my macOS to 15.4 yesterday. Tested on macOS 14 (inside a VM) and everything worked fine, confirming that the issue is specific to macOS 15.4.
The text was updated successfully, but these errors were encountered: