Skip to content
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

Requirement Conflict #228

Open
hTp34r opened this issue Sep 10, 2024 · 6 comments
Open

Requirement Conflict #228

hTp34r opened this issue Sep 10, 2024 · 6 comments

Comments

@hTp34r
Copy link

hTp34r commented Sep 10, 2024

When I tried executing:
···
bash docs/prepare_env/install_ext.sh
···
It returned error which read 'The detected CUDA version (11.7) mismatches the version that was used to compile PyTorch (12.1). Please make sure to use the same CUDA versions.' However, we are supposed to install CUDA 11.7 since in your install_guide-zh.md it said '我们推荐安装torch2.0.1+cuda11.7. 已经发现 torch=2.1+cuda12.1 会导致 torch-ngp 错误'. How should I do? My machine is Ubuntu 22.04 with CUDA 11.7.0 locally installed and conda environment with python=3.9

@nitinmukesh
Copy link

I am facing the same problem in Windows.

I know this is related to radnerfs as it is getting the CUDA version from Environment variables and not from conda environment. But what need to be done to fix this?

@hTp34r
Copy link
Author

hTp34r commented Sep 18, 2024

I am facing the same problem in Windows.

I know this is related to radnerfs as it is getting the CUDA version from Environment variables and not from conda environment. But what need to be done to fix this?

Sorry I'm also unsure about how to address it... qwq

@nitinmukesh
Copy link

The solution is the install the same CUDA version on your machine.

You can change it back to later version afterwards.

@hTp34r
Copy link
Author

hTp34r commented Sep 20, 2024

The solution is the install the same CUDA version on your machine.

You can change it back to later version afterwards.

Sorry but it doesn't work for me. Although I installed CUDA 11.7 on my computer both outside the conda environment and inside, some requirements that only support CUDA 12.1 were still automatically downloaded...

@ishumilin
Copy link

The conflict is caused by pip installing pytorch-lightning that depends on torch 2.5.0. Since pip has no idea of conda environment, it overrides torch that was installed earlier. Comment it out in requirements.txt and install it with conda before you run remaining pip commands. So:

cd <GeneFaceRoot>
source <CondaRoot>/bin/activate
conda create -n geneface python=3.9
conda activate geneface

conda install conda-forge::ffmpeg # ffmpeg with libx264 codec to turn images to video
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 pytorch3d -c pytorch -c nvidia -c pytorch3d
conda install lightning -c conda-forge

pip install cython
pip install openmim==0.3.9
mim install mmcv==2.1.0 # use mim to speed up installation for mmcv

sudo apt-get install libasound2-dev portaudio19-dev
pip install -r docs/prepare_env/requirements.txt -v

bash docs/prepare_env/install_ext.sh

@ArindamRoy23
Copy link

@ishumilin Thanks a ton! Worked. Cant imagine how you figured that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants