No module named 'torch'
When I tried to intall mmdet3d, the error occured. However, the torch 2.1.2 has been correctly installed in conda env. Anyone knows how to deal with the error?
Using pip 25.3 from /home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip (python 3.10)
Obtaining file:///workspace/OpenDriveVLA/third_party/mmdetection3d_1_0_0rc6
Running command installing build dependencies
Using pip 25.3 from /home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip (python 3.10)
Collecting setuptools>=40.8.0
Obtaining dependency information for setuptools>=40.8.0 from https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl.metadata
Using cached setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
Using cached setuptools-80.9.0-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools
Successfully installed setuptools-80.9.0
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Getting requirements to build editable
Traceback (most recent call last):
File "/home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> No available output.
note: This error originates from a subprocess, and is likely not a problem with pip. full command: /home/appuser/anaconda3/envs/drivevla/bin/python3.10 /home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_editable /tmp/tmpt7shuavm cwd: /workspace/OpenDriveVLA/third_party/mmdetection3d_1_0_0rc6 Getting requirements to build editable ... error ERROR: Failed to build 'file:///workspace/OpenDriveVLA/third_party/mmdetection3d_1_0_0rc6' when getting requirements to build editable
We suggest you install the environment following the tutorial with the same cuda version
Hi,
If you confirmed that you have torch installed in your conda env,
the issue is probably because pip used an isolated environment and not able to find the pytorch you installed.
This is how it worked for me:
essentiall added the --no-build-isolation flag:
pip install . --no-build-isolation
Hope it helps!