-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized() ' #1620
Comments
Filed as internal issue #USD-6898 |
Hi @aaronn, I don't have a conda environment set up so I'm unable to reproduce this locally. We've seen this issue in the past when USD is built against a Python library that is different from the one used by the python interpreter. You could try looking in your |
I have the same error in a Python 3.8 anaconda environment.
and also:
|
@aaronn @toloudis I'm running into the same issue, has there been a solution found for this? I'm running a conda environment with python 3.7, I checked every library linked with python and they're all correct. Even displaying all DYLIB's used when running Not sure what else to do, the conda environment is really important to the pipeline, and is used on Windows & Linux without problems. |
See issue #1466, and quite a few others. |
I found the cause of the issue for Conda + MacOS users: Conda ships with a python 3 binary that is statically linked to the python library (which USD advises against in the doc). And the crash is likely caused by duplicate symbol errors since the python lib is trying to load twice. Although oddly this is only an issue on MacOS. According to the BUILDING.md doc, there is a flag here to pass while building this will prevent static linking with the python library.
I've just tested a build with this flag, and everything works as expected now! |
I also encountered this crash when building the pxr 21.11 release on MacOS Monterey. We were discussing the build in this issue case as we tried building on M1 Mac, but only managed to build when running in a Rosetta x86 environment. In my case I build the USD using:
and got the crash:
The apple scripts are all written in Python 2, so before running the above I used pyenv to install |
macOS12.4 intel x64 crashes as well. |
PXR_PY_UNDEFINED_DYNAMIC_LOOKUP might be explicitly set when packaging wheels, or when cross compiling to a Python environment that is not the current interpreter environment. If it was not explicitly set to ON or OFF, then determine whether Python was statically linked to its runtime library by fetching the sysconfig variable LDLIBRARY, and set the variable accordingly. If the variable does not exist, PXR_PY_UNDEFINED_DYNAMIC_LOOKUP will default to OFF. On Windows, LDLIBRARY does not exist, as the default will always be OFF. Fixes #1620 (Internal change: 2263328)
Description of Issue
Hey everyone, not sure if I'm doing this correctly, but I tried installing USD on Big Sur.
Im running into a Python crash when I try to run usdview.
----------------------- 'Python' is dying ------------------------
Python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized() '
in operator() at line 148 of /Users/Aaron/Documents/Conda/USD/pxr/base/lib/tf/pyTracing.cpp
Steps to Reproduce
I'm building this with Conda:
System Information (OS, Hardware)
Big Sur 11.5.1
Package Versions
Build Flags
python USD/build_scripts/build_usd.py /opt/local/USD
The text was updated successfully, but these errors were encountered: