Open zhiawei opened 7 months ago
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113 ERROR: Could not find a version that satisfies the requirement torch==1.12.0+cu113 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0) ERROR: No matching distribution found for torch==1.12.0+cu113
Still like this
Hi @Keronaya, I am not sure whether this will help you. I manage to install alphapose by replacing the whole script below:
#CUDA Toolkit 11.3
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
sudo sh cuda_11.3.0_465.19.01_linux.run
export PATH=/usr/local/cuda-11.3/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64/:$LD_LIBRARY_PATH
#Nvidia cuDNN (this might not be important but why not)
wget https://developer.download.nvidia.com/compute/cudnn/9.1.0/local_installers/cudnn-local-repo-ubuntu2204-9.1.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.1.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.1.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn-cuda-11
#Torch
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113
To the following conda command:
# 20240919 Replace the above with the conda command to keep cuda installation in the conda environment.
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
I'm using:
From a fresh WSL:
Error I gotten so far:
python -c "import torch; print(torch.cuda.is_available())"
if this says FALSE, your CUDA version went wrong somewhere. Your Driver being 12.4 is fine, but the CUDA Toolkit and Torch needs to be the same. Mine is based on CUDA 11.3Could not load library libcudnn_cnn_infer.so.8. Error: libcuda.so: cannot open shared object file: No such file or directory Please make sure libcudnn_cnn_infer.so.8 is in your library path!
If you got this error, the solution link is here https://discuss.pytorch.org/t/libcudnn-cnn-infer-so-8-library-can-not-found/164661/19 BUT I just use this:export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
and restart my terminal. It seems this is WSL2 problem that I'm too stupid to understand.To compile and install locally run "python setup.py build_ext --inplace"
To install library to Python site-packages run "python setup.py build_ext install"
ext_modules = [ Extension( 'halpecocotools._mask', sources=['common/maskApi.c'], # update this line include_dirs = [np.get_include(), 'common'], extra_compile_args=[], ) ]
setup( name='halpecocotools', packages = ['halpecocotools'], package_dir = {'halpecocotools': 'halpecocotools'}, install_requires=[ 'setuptools>=18.0', 'cython>=0.27.3', 'matplotlib>=2.1.0', ], version='0.0.0', description="COCO API for Halpe-Fullbody dataset", url="https://github.com/HaoyiZhu/HalpeCOCOAPI", ext_modules= ext_modules )