If you import pxr in a python interpreter then launch a subprocess that has its own USD libraries (eg. Maya), the extra entry added into PATH loads the incorrect DLL's and prevents the subprocess from loading USD.
This is something that can be worked around on our end. But I really don't like that importing a module changes PATH.
It looks like this only happens on Windows, and is only added to the PyPi upload to make anaconda work
// Error: file: C:/Program Files/Autodesk/Maya2024/scripts/others/pluginWin.mel line 316: Unable to dynamically load : C:/Program Files/Autodesk/MayaUSD/Maya2024/0.25.0/mayausd/MayaUSD/plugin/adsk/plugin/mayaUsdPlugin.mll
// The specified procedure could not be found.
// Error: file: C:/Program Files/Autodesk/Maya2024/scripts/others/pluginWin.mel line 316: The specified procedure could not be found.
// (mayaUsdPlugin)
System Information (OS, Hardware)
Windows 10
Package Versions
System Python USD version: 0.24.5
Maya Python USD version: 0.22.11
MayaUSD version 0.25.0
Python 3.9.12
Description of Issue
If you
import pxr
in a python interpreter then launch a subprocess that has its own USD libraries (eg. Maya), the extra entry added into PATH loads the incorrect DLL's and prevents the subprocess from loading USD.This is something that can be worked around on our end. But I really don't like that importing a module changes PATH. It looks like this only happens on Windows, and is only added to the PyPi upload to make anaconda work
The PATH change happens here: build_scripts/pypi/package_files/setup.py
Steps to Reproduce
import pxr, subprocess
subprocess.Popen(r'C:\Program Files\Autodesk\Maya2024\bin\maya.exe')
System Information (OS, Hardware)
Windows 10
Package Versions
System Python USD version: 0.24.5 Maya Python USD version: 0.22.11 MayaUSD version 0.25.0 Python 3.9.12