Note: This setup is not using
virtualenv
since I didn't get that to work for building.
- install Xcode from App Store
- alternative: only install the Xcode Command Line Utilities
- install official CMake
- at time of writing: Direct download link
- install official Python 3.10
- at time of writing: Direct download link
- default Python install goes to:
/usr/local/bin/python3
- clone the OpenUSD repo to
/Users/herbst/git/OpenUSD
- switch to right branch (latest release tag recommended, but can also use latest dev)
NOTE: as of 2023-07-11, latest release has a bug with Python 3.10 and PySide6. Building from latest dev works. Alternative: Use Python 3.7 and PySide2
cd /Users/herbst/git/OpenUSD # go to OpenUSD folder where the repo was cloned
pip install PySide6 PyOpenGL # install PySide6 and PyOpenGL
PATH="/Applications/CMake.app/Contents/bin":"$PATH" # add CMake to PATH temporarily
xcode-select # just to verify the Xcode command line tools are installed, should log something
/usr/local/bin/python3 build_scripts/build_usd.py /Users/herbst/OpenUSDBuild # run the actual build
Should log:
STATUS: Installing USD...
Success! To use USD, please ensure that you have:
The following in your PYTHONPATH environment variable:
/Users/herbst/OpenUSDBuild/lib/python
The following in your PATH environment variable:
/Users/herbst/OpenUSDBuild/bin
- open
/Users/herbst/.zshrc
and add the following lines:
export PATH="$PATH:/Users/herbst/OpenUSDBuild/bin"
export PYTHONPATH="$PYTHONPATH:/Users/herbst/OpenUSDBuild/lib/python"
- Command + Space to open Spotlight Search
- Type "Shortcuts" and hit Enter
- Click the + button in the top right corner
- Set "Receive" to "Files"
- Add "Run Shell Script"
- Paste the following into the text box:
export PATH="$PATH:/Users/herbst/OpenUSDBuild/bin" export PYTHONPATH="$PYTHONPATH:/Users/herbst/OpenUSDBuild/lib/python" usdview Shortcut Input (File Path)
- Make sure "Use as Quick Action" and "Finder" are checked
Thank you for this. For what it's worth, for OpenUSD release 24.08, I used PyEnv to install Python 3.11.9 as the latest 3.12.x is still unsupported. No specific version of PySide6 was needed. I found that https://vfxplatform.com was a great reference to figure out what is supposed to be supported.
(yes I am new to USD, how can you tell?)