Closed enzyme69 closed 5 years ago
If I use Python 3:
Traceback (most recent call last):
File "gltf2usd.py", line 18, in <module>
from pxr import Usd, UsdGeom, Sdf, UsdShade, Gf, UsdSkel, Vt, Ar, UsdUtils
File "/Users/jimmygunawan/Projects/Pixar/BUILD/lib/python/pxr/Usd/__init__.py", line 24, in <module>
import _usd
ModuleNotFoundError: No module named '_usd'
Requirement already satisfied: pillow in /usr/local/lib/python2.7/site-packages (5.3.0)
192-168-1-7:USDZ_TotoroSimple jimmygunawan$ python gltf2usd.py
Traceback (most recent call last):
File "gltf2usd.py", line 16, in
... I am getting crazy...
Have to use VirtualEnv after all... hmm...
192-168-1-7:~ jimmygunawan$ virtualenv -p python2 VENV_USDZ Running virtualenv with interpreter /usr/local/bin/python2 New python executable in /Users/jimmygunawan/VENV_USDZ/bin/python2.7 Also creating executable in /Users/jimmygunawan/VENV_USDZ/bin/python Installing setuptools, pip, wheel... done. 192-168-1-7:~ jimmygunawan$ source VENV_USDZ/bin/activate (VENV_USDZ) 192-168-1-7:~ jimmygunawan$ python Python 2.7.15 (default, Jul 23 2018, 21:27:06) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import PIL Traceback (most recent call last): File "
", line 1, in ImportError: No module named PIL [7]+ Stopped python (VENV_USDZ) 192-168-1-7:~ jimmygunawan$ (VENV_USDZ) 192-168-1-7:~ jimmygunawan$ (VENV_USDZ) 192-168-1-7:~ jimmygunawan$ pip install PIL Collecting PIL Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribution found for PIL (VENV_USDZ) 192-168-1-7:~ jimmygunawan$ pip install pillow Collecting pillow Using cached https://files.pythonhosted.org/packages/2e/f6/e6d56ec19fae0b76932a343355c7a37198fd8e76c26bc2f2779fc85b4684/Pillow-5.3.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl Installing collected packages: pillow Successfully installed pillow-5.3.0
(VENV_USDZ) 192-168-1-7:USDZ_TotoroSimple jimmygunawan$ python gltf2usd.py
------------------------ 'python' is dying ------------------------ python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized() ' in operator() at line 148 of /Users/jimmygunawan/Projects/Pixar/USD/pxr/base/lib/tf/pyTracing.cpp
Abort trap: 6 (VENV_USDZ) 192-168-1-7:USDZ_TotoroSimple jimmygunawan$
If I use virtualenv, and inside Python running: from pxr import Usd it crashes Python...... If I am outside running python, running: from pixr import Usd -- it works! But It does not load PIL...
I am using Apple's Pixar USD Bundle.
I have to do this:
sudo nano ~/.bash_profile
export PATH=$PATH:$HOME/USDPython/USD export PYTHONPATH=$PYTHONPATH:$HOME/USDPython/USD export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
It's so weird, anyhow, it's still pretty annoying that virtualenv one crashing Python, but the main one works. And I also made a new Account cleanly installing Apple's Pixar USD build, and then I still need to do bash_profile stuff and yeah... it works without Python crashing.
Just for my future me or anyone with such issue:
https://stackoverflow.com/questions/25607837/pip-install-not-installing-into-correct-directory
In the past I have been using conda / anaconda / mini-conda, but better of using virtualenv and watch Coding Train video tutorial on it.
But using virtualenv I ended keep crashing if Python USD install is using the one from Apple... it's a headache...
If using Apple USDPython, we need to use Python from Mac.
If I use Python 3:
Traceback (most recent call last): File "gltf2usd.py", line 18, in <module> from pxr import Usd, UsdGeom, Sdf, UsdShade, Gf, UsdSkel, Vt, Ar, UsdUtils File "/Users/jimmygunawan/Projects/Pixar/BUILD/lib/python/pxr/Usd/__init__.py", line 24, in <module> import _usd ModuleNotFoundError: No module named '_usd'
@enzyme69
This error doesn't seem to be related with your solution... How did you overcome this one? I am getting this error for python27 as well as python 3.
Hello I am back, I downloaded the latest gltf2usd but when running I am getting this error. I am sure I have PIL module. This is so weird.