![]() If you use small steps, then you can even see how Python evaluates your expressions. Steps follow program structure, not just code lines. Press F6 for a big step and F7 for a small step. Just press Ctrl+F5 instead of F5 and you can run your programs step-by-step, no breakpoints needed. Once you're done with hello-worlds, select View → Variables and see how your programs and shell commands affect Python variables. (You can also use a separate Python installation, if necessary.) The initial user interface is stripped of all features that may distract beginners. Getting to this point wasn’t at all straightforward for me, so I’m hoping that by pushing this detail out there with my blog, Google will have it included in its index for the next individual, whether they’re searching on the error message or searching for how to install USD on an M1 Mac.Thonny comes with Python 3.10 built in, so just one simple installer is needed and you're ready to learn programming. Nick Porcino was kind enough to jump in as well and provide an explanation:Ĭonda distributed Pythons are statically linked as a way to reduce unexpected system and installation coupling, but Python isn’t, to my knowledge, built in such a way that an external build system can robustly discover whether you are targeting a static or dynamically linked Python so we are forced to deal with it manually. Sunya Boonyatera provided the critical knowledge on how to add it in to get it to work: python build_scripts/build_usd.py /opt/local/USD -build-args USD,"-DPXR_PY_UNDEFINED_DYNAMIC_LOOKUP=ON" I originally though that meant just exporting it as environment variables, but that doesn’t do the trick with USD’s build and installation process. The key to getting it working is passing adding a build configuration detail: The same issue happens regardless of architecture – so it’s quirk for x86 as much as aarch64 architectures. ![]() It turns out that an additional build configuration option is needed, specifically for python installed through Conda, because of the way it links to python. I opened an issue on USD’s GitHub project, and quickly got some super helpful support from their team. In operator() at line 149 of /Users/heckj/src/USD/pxr/base/tf/pyTracing.cpp FATAL ERROR: Failed axiom: ' Py_IsInitialized() ' It compiled and installed fine, but any tool I attempted to use crashed immediately with the following error message: python crashed. Python build_scripts/build_usd.py /opt/local/USD ![]() With conda installed (and activated), I started installing the various dependencies: conda install pyopenglĪnd then grabbed the open source distribution of USD from Github and set it to building, with the results installed at /opt/local/USD: git clone ![]() To get started, I’d installed miniforge, downloading and then running it to install and update: sh ~/Downloads/Miniforge3-MacOSX-arm64.sh Since I wasn’t sure what the path for Python3 support was looking like, and it took a while get a M1 native build of python in the first place, I’d switched over to installing Python using the packaging tool `conda`, which has been fairly popular and prevalent for ML folks to use. macOS has stopped including Python3 in its default install, although it appears that if you install Xcode (or developer tools on the CLI), you’ll get a version of Python 3 (3.89) installed on the OS. I struggled quite bit with getting USD both installed and operational because, as it turns out, there’s a bit of quirk to Python that made things more difficult. I saw USD release 22.08 drop a few weeks ago, and notably within its release notes is the sentence: “Added support for native builds on Apple Silicon.” ![]()
0 Comments
Leave a Reply. |