OmniDrones icon indicating copy to clipboard operation
OmniDrones copied to clipboard

Cannot import torch

Open JJJJJllll opened this issue 11 months ago • 3 comments

Hi, I hope it finds you well! I'm using Issac Sim 2023.1.0.hotfix, python3.7, and I cannot import pytorch, would you please help me with it? I created a python env with conda and copied configuration file from Omnidrones. I can run python -c "from omni.isaac.kit import SimulationApp" But I can't run python -c "import torch; print(torch.__path__)", errors are like that:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/comb/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/torch/__init__.py", line 454, in <module>
    ''').strip()) from None
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.

I'm really confused. Looking forward to your reply!

JJJJJllll avatar Mar 08 '24 05:03 JJJJJllll