ModuleNotFoundError: No module named 'pxr'
See original GitHub issueHello, 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 <module> 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 <module> ??? 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 <module> 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 <module> ??? 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`
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:10 (4 by maintainers)
Top Related StackOverflow Question
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.
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 .
https://pypi.org/project/usd-core/