tristandeleu / pytorch-meta

A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
https://tristandeleu.github.io/pytorch-meta/
MIT License
1.97k stars 256 forks source link

how to download a pytorch version that is compatible with thorchmeta 1.8.0 #168

Open brando90 opened 1 year ago

brando90 commented 1 year ago
pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.9.1+cu111
ERROR: No matching distribution found for torch==1.9.1+cu111
brando90 commented 1 year ago

pip and conda

brando90 commented 1 year ago

@tristandeleu how did you install pytorch? I've tried different ways and it doesn't work. The weirdest thing is that I have a different env that does have it but it doesn't let me on a fresh env. :/

https://stackoverflow.com/questions/75023226/why-is-pip-not-letting-me-install-torch-1-9-1cu111-in-a-new-conda-env-when-i-h https://stackoverflow.com/questions/75023226/why-is-pip-not-letting-me-install-torch-1-9-1cu111-in-a-new-conda-env-when-i-h


pip install torch==1.9.1+cu111
#pip install torch==1.9.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
#pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
#pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

none of the above worked.

brando90 commented 1 year ago

@tristandeleu how did you install pytorch? I've tried different ways and it doesn't work. The weirdest thing is that I have a different env that does have it but it doesn't let me on a fresh env. :/

https://stackoverflow.com/questions/75023226/why-is-pip-not-letting-me-install-torch-1-9-1cu111-in-a-new-conda-env-when-i-h https://stackoverflow.com/questions/75023226/why-is-pip-not-letting-me-install-torch-1-9-1cu111-in-a-new-conda-env-when-i-h


pip install torch==1.9.1+cu111
#pip install torch==1.9.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
#pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
#pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

none of the above worked.

# - create conda env
conda create -n metalearning_gpu python=3.9
conda activate metalearning_gpu
## conda remove --name metalearning_gpu --all

# - make sure pip is up to date
which python
pip install --upgrade pip
pip3 install --upgrade pip
which pip
which pip3

# -- Install PyTorch sometimes requires more careful versioning due to cuda, ref: official install instruction https://pytorch.org/get-started/previous-versions/
# you need python 3.9 for torch version 1.9.1 to work, due to torchmeta==1.8.0 requirement
if ! python -V 2>&1 | grep -q 'Python 3\.9'; then
    echo "Error: Python 3.9 is required!"
    exit 1
fi

pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html