-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting up Apex and get this error: ModuleNotFoundError: No module named 'torch' #1823
Comments
+1 |
I have the same issue. Thanks for posting and could you let me know if you got a solution yet? |
Hey this command worked for me |
I encounter this problem, too~ |
Hello, have you solved this problem? |
+1 |
Heres a couple posts that I followed. I specifically remember downloading the non master branch and following these steps to get it to start working. Try either |
I am facing the same issue. Please help! |
#1748 (comment) |
I add "sudo" in my command, and it works. |
python3 setup.py install => this worked for me |
Describe the Bug
Followed this set up to be able to train the model in this git repo https://github.com/implus/mae_segmentation .
This is how I set up my conda enviroment:
conda create -n mmseg python=3.8
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch
pip install mmcv-full==1.3.0 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6/index.html
pip install scipy timm==0.3.2
conda install -c nvidia cuda-nvcc #problem arose before and after installing this
pip install mmsegmentation==0.11.0
When I run this command when i cd into apex
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
I get this output:
[filler apex]$ pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
Using pip 24.0 from /vast/home/mayolo/.conda/envs/mmseg/lib/python3.8/site-packages/pip (python 3.8)
DEPRECATION: --build-option and --global-option are deprecated. pip 24.2 will enforce this behaviour change. A possible replacement is to use --config-settings. Discussion can be found at pypa/pip#11859
WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option.
Processing /vast/home/mayolo/apex
Running command pip subprocess to install build dependencies
Collecting setuptools
Using cached setuptools-72.1.0-py3-none-any.whl
Collecting wheel
Using cached wheel-0.43.0-py3-none-any.whl
Installing collected packages: wheel, setuptools
Successfully installed setuptools-72.1.0 wheel-0.43.0
Installing build dependencies ... done
Running command Getting requirements to build wheel
Traceback (most recent call last):
File "/vast/home/mayolo/.conda/envs/mmseg/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/vast/home/mayolo/.conda/envs/mmseg/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/vast/home/mayolo/.conda/envs/mmseg/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/ram/tmp/pip-build-env-5ganjv56/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/ram/tmp/pip-build-env-5ganjv56/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/ram/tmp/pip-build-env-5ganjv56/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "", line 10, in
ModuleNotFoundError: No module named 'torch'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /vast/home/mayolo/.conda/envs/mmseg/bin/python /vast/home/mayolo/.conda/envs/mmseg/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpywx7_ti5
cwd: /vast/home/mayolo/apex
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
The text was updated successfully, but these errors were encountered: