OpenDriveVLA icon indicating copy to clipboard operation
OpenDriveVLA copied to clipboard

No module named 'torch'

Open solidexu opened this issue 1 year ago • 2 comments

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 main() File "/home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/home/appuser/anaconda3/envs/drivevla/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-r98xuq8v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-r98xuq8v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-r98xuq8v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-r98xuq8v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-r98xuq8v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "", line 9, in ModuleNotFoundError: No module named 'torch' error: subprocess-exited-with-error

× 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

solidexu avatar Oct 29 '25 10:10 solidexu

We suggest you install the environment following the tutorial with the same cuda version

DriveVLA avatar Nov 14 '25 15:11 DriveVLA

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!

GoroYeh56 avatar Nov 27 '25 00:11 GoroYeh56