Closed pbermell closed 4 years ago
Module pxr
is Pixar's USD.
What is strange is pxr
module can only be built for Python 2 (using their build_usd.py
script), while Kaolin build expects Python 3.6+.
I'm wondering then how is Kaolin supposed to work at all with USD..?
Prior to running the tests, please run the command source setenv.sh
, which will point Python to the necessary libraries. This needs to be better documented, so thank you for bringing it up!
@vmlaker, we use a version of USD that has been adapted to Python 3.6+. You can check it out here https://developer.nvidia.com/usd#binaries. Note, USDView remains only compatible with Python 2.
Thanks JFL, There is one thing that is puzzling me though. I can import kaolin without errors. and the paths seem to be in PYTHONPATH and LD_LIBRARY_PATH However, when I run the test I still get the 'No module named 'pxr'' error. attached here some tests on the interpreter. Maybe the pxd has not been compiled properly...? Perhaps I should try using the built ones in https://developer.nvidia.com/usd#binaries. regards
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kaolin
>>> import os
>>> print(os.environ.get('LD_LIBRARY_PATH'))
home/pabs/PycharmProjects/kaolin/build/target-deps/nv_usd/release/lib/
>>> print(os.environ.get('PYTHONPATH'))
home/pabs/PycharmProjects/kaolin/build/target-deps/nv_usd/release/lib/python
>>>
@pbermell We just merged a change this morning that should fix these issues. Please try pulling the changes and running the setup again and let us know whether you still encounter the same error. Thanks for posting the issue!
Hi,
I am having some trouble solving this on windows 10. I am getting the same errors as posted above. Do you have any suggestions as to how I might go about doing this?
Best regards, Tobias
Hello @Tojens, we don't officially support Windows currently (it's coming!), but if you're getting a pxr
related error when running tests, you can disable that particular test by commenting out or deleting the file located under tests/datasets/test_usdfile.py
. Please let me know if this helps!
Thank you for the quick response - that was very helpful :). It has been fairly straightforward to get started even on windows and I am very interested in seeing this evolve. I am crossing my fingers that you might be able to create some documentation/examples for loading datasets like Paris-Lille and applying a classification/segmentation algorithm at some point :)
@Tojens Thank you for the feedback! We have many updates planned for the near future and we will continue to add new functionality and support for more models and datasets. We will certainly look at whether to add support for Paris-Lille, though I can't provide anything more concrete yet.
Closing this as issue is resolved.
@Tojens Can you tell me more details on your Windows setup that's working for Kaolin?
I'm getting a Cuda compilation error I haven't been able to resolve yet..
Hi did you find a solution to it? In my case, after installing usd-core (latest version:22.3) through pip install, the error message does not appear .
Hello, when I run this command as described in the documentation (with a space between "kaolin/" and "tests"):
pytest --cov=kaolin/ tests I get the attached output. Any hints on what I am missing? other than: Hint: make sure your test modules/packages have valid Python names.
Thanks
Pablo
`========================================================================================================== test session starts ========================================================================================================== platform linux -- Python 3.6.8, pytest-5.3.0, py-1.8.0, pluggy-0.13.0 rootdir: /home/pabs/PycharmProjects/kaolin plugins: cov-2.8.1 collected 114 items / 2 errors / 112 selected
Coverage.py warning: No data was collected. (no-data-collected) WARNING: Failed to generate report: No data to report.
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/pytest_cov-2.8.1-py3.6.egg/pytest_cov/plugin.py:254: PytestWarning: Failed to generate report: No data to report.
self.cov_controller.finish()
================================================================================================================ ERRORS ================================================================================================================= ____ ERROR collecting tests/datasets/test_usdfile.py ____ ImportError while importing test module '/home/pabs/PycharmProjects/kaolin/tests/datasets/test_usdfile.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: tests/datasets/test_usdfile.py:19: in
from kaolin.datasets.usdfile import USDMeshes
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/usdfile.py:19: in
???
E ModuleNotFoundError: No module named 'pxr'
___ ERROR collecting tests/visualize/test_vis_usd.py ____
ImportError while importing test module '/home/pabs/PycharmProjects/kaolin/tests/visualize/test_vis_usd.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/visualize/test_vis_usd.py:8: in
from kaolin.visualize.vis_usd import VisUsd
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/visualize/vis_usd.py:24: in
???
E ModuleNotFoundError: No module named 'pxr'
=========================================================================================================== warnings summary ============================================================================================================
venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3
/home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/nnsearch.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861 venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861 /home/pabs/PycharmProjects/kaolin/venv/lib/python3.6/site-packages/kaolin-0.2.0+f858c58-py3.6-linux-x86_64.egg/kaolin/datasets/shapenet.py:861: DeprecationWarning: invalid escape sequence *
-- Docs: https://docs.pytest.org/en/latest/warnings.html
----------- coverage: platform linux, python 3.6.8-final-0 -----------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===================================================================================================== 3 warnings, 2 errors in 4.99s`