[Using my own anaconda env] ModuleNotFoundError: No module named 'carb._carb'


I tried to run standalone examples with my other anaconda environment(named 'tool-manipulation) but, I cannot run on the terminal. The environment contains all required packages which are described at environment.yml.
The error message just occurred.

Traceback (most recent call last):
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.0/standalone_examples/api/omni.isaac.franka/pick_place.py", line 9, in <module>
    from omni.isaac.kit import SimulationApp
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.kit/omni/isaac/kit/__init__.py", line 11, in <module>
    from .simulation_app import SimulationApp
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.kit/omni/isaac/kit/simulation_app.py", line 16, in <module>
    import carb
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.0/kit/kernel/py/carb/__init__.py", line 29, in <module>
    from ._carb import *
ModuleNotFoundError: No module named 'carb._carb'

I ran the code after entering source setup_conda_env.sh. However, after entering source setup_conda_env.sh then import torch at the terminal, there was an ImportError message.

(tool-manipulation) bak@bak-ubuntu:~/.local/share/ov/pkg/isaac_sim-2022.2.0$ source setup_conda_env.sh
(tool-manipulation) bak@bak-ubuntu:~/.local/share/ov/pkg/isaac_sim-2022.2.0$ python
Python 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.0/extscache/omni.pip.torch-1_13_0-0.1.4+104.1.lx64/torch-1-13-0/torch/__init__.py", line 209, in <module>
    raise ImportError(textwrap.dedent('''
ImportError: Failed to load PyTorch C extensions:
    It appears that PyTorch has loaded the `torch/_C` folder
    of the PyTorch repository rather than the C extensions which
    are expected in the `torch._C` namespace. This can occur when
    using the `install` workflow. e.g.
        $ python setup.py install && python -c "import torch"

    This error can generally be solved using the `develop` workflow
        $ python setup.py develop && python -c "import torch"  # This should succeed
    or by running Python from a different directory.

The strange thing is I can run and debug with VScode but, still didn’t work on the terminal at VScode.

The anaconda environment which was made by environment.yml through the document(link) only work on both terminal and VScode (debug and run mode).

My anaconda environment (tool-manipulation) has

Python Version: 3.10
PyTorch version: 1.13.1

and has other system environments

Driver Version: 525.60.11
CUDA Version: 11.8

How can I use my own anaconda environments stably? Do I have to set Python 3.7 as the environment.yml?

Hi @psh9002

The Python version needs to be 3.7 as indicated in this post:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.