-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Retire distutils
from Python code
#3389
Comments
Agree that this would be helpful. 👍 |
Filed as internal issue #USD-10385 |
On Windows 11,
|
Hey @mscherotter I'm unable to reproduce, as I can run One thing to check / make sure of is that you set your PATH and PYTHONPATH after building with the python build script, or since it appears you're running |
Thanks for the response. I have these set as: PYTHON=C:\Users\syner\AppData\Local\Programs\Python\Python310 does that look correct? Michael |
I think you need to add the USD paths to your PATH as well. Here are my steps:
|
I do not see the 3389-Remove-distutils branch here:
https://github.com/PixarAnimationStudios/OpenUSD/branches
please advise.
Thanks,
Michael
[image: image.png]
…On Fri, Jan 24, 2025 at 2:35 PM Andy ***@***.***> wrote:
I think you need to add the USD paths to your PATH as well. Here are my
steps:
1. Clone the repo in C:\my\cloned\repo\dir make sure you're on the
3389-Remove-distutils branch
2. Build: python build_scripts\build_usd.py
C:\my\build\dir\usd-no-dist-utils
3. Add C:\my\build\dir\usd-no-dist-utils\lib to your PATH
4. Add C:\my\build\dir\usd-no-dist-utils\bin to your PATH
5. Add C:\my\build\dir\usd-no-dist-utils\lib\python to your PYTHONPATH
6. Open a new terminal: usdview
C:\my\cloned\repo\dir\OpenUSD\extras\usd\tutorials\referencingLayers\HelloWorld.usda
7. View the blue sphere
—
Reply to this email directly, view it on GitHub
<#3389 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4VJQ2OXMXO3DAGHFBJOT2MK5ZNAVCNFSM6AAAAABRAST6OWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJTGUZDEOBVGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Michael S. Scherotter
***@***.***
http://www.charette.com
|
https://github.com/beersandrew/USD/branches it's here, on my fork |
Hello - I am running into this issue while using Python 3.13.1 on my machine. This is just from running Edit/Update - Ah, I re-read and followed @beersandrew steps above, and it worked! This was on macOS Sequoia 15.1 (instead of Winodws). I also had to make sure I cleaned up/removed my previous environment variables that pointed to the previous build:
|
Description of Issue
The
distutils
module is considered deprecated and has been removed in Python 3.12. That means the OpenUSD code (v24.11) compiles against Python 3.12, but then hits a runtime error when launchingusdview
.I understand that the VFX platform for CY2025 is still targeting Python 3.11.x, but this was fixed for the build script (even though this ticket about the issue was closed: #2817) and there are only two functions from
distutils
still in use:from distutils.spawn import find_executable
which is easily replaceable withshutil.which
. Anddistutils.util.strtobool
, which does not have a direct replacement, but should be easy. See also https://peps.python.org/pep-0632/It would be nice to improve the Python 3.12 support by taking this small extra step. Thanks!
The text was updated successfully, but these errors were encountered: