I'm trying to install specific PyTorch version under conda env:
Using pip:
pip3 install pytorch==1.0.1
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pytorch==1.0.1 (from versions: 0.1.2, 1.0.2)
ERROR: No matching distribution found for pytorch==1.0.1
Using Conda:
conda install pytorch==1.0.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pytorch==1.0.1
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I was able to find this version under https://anaconda.org/soumith/pytorch but is there a way to find it and install from console?
You can download/install the version you like from the official Pytorch's Conda package. the link you specified is an old version and is not supported/updated for quit some time now!.
Install your desired version like this :
conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
If you are looking for a pip version, you can view and access all versions from here as well.
and simply do :
pip install torch===1.0.1 -f https://download.pytorch.org/whl/torch_stable.html
You can always check the previous versions here as well.
You could download a previous version of pytorch by using any of these :
For Linux/Windows Specific OS
# CUDA 9.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch
Visit this website to see how to install pytorch versions on your specific operating software. I hope this answer was helpful.
Related
I discovered that one can install much more than python stuff in conda. I am instlaling opam with conda for ubuntu with:
conda install -c conda-forge opam
and wanted to do it for my mac. Got some issues.
(iit_synthesis) brandomiranda~/iit-term-synthesis ❯ conda install -c conda-forge opam
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- opam
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
does anyone know how to resolve them or install opam with a mac?
The Conda Forge feedstock for opam is only configured to build for linux-64 platform. Consider opening an Issue to request additional platform support for Conda.
Otherwise, there are binary distribution options for MacOS.
I am trying to install the Python-binance package to Pycharm, but it is not available for the conda interpreter that I use.
When I try to install it via 'conda install python-binance' in my terminal I get the following error:
(base) patrickchong#Patricks-MacBook-Pro ~ % conda install python-binance
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- python-binance
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Which is strange, because it installs fine when I run 'pip install python-binance'.
Any help would be much appreciated!
Thanks to Flying Teller's comments below I managed to install python-binance using conda. However, in my Python interpreter, which uses conda, python-binance still doesn't appear? (when I click the + sign and look for python-binance it is not there?)
There is nothing unexpected happening here. pip and conda use different sources for their packages. pip always checks PyPi on which python-binance is available. conda looks for packages in a list of configured channels, in you case, the default channels. But if you check with the search function on anaconda.org, you can see that the package is only available from conda-forge, so you can install it from conda using
conda install -c conda-forge python-binance
I use "(pytorch) eben:~ eben_hu$ conda install torch" to install torch in my environment "pytorch", and here is the result:
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
torch
Current channels:
https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I wonder why there's no such package in the anaconda?
Conda's name for the pytorch package is pytorch (unlike pip's which is torch)
Therefore this should be the right command for mac:
conda install pytorch torchvision torchaudio -c pytorch
I am in a weird scenario were I am forced to use torch 1.3.1 (due to hardware see: https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/). I read from the pytorch docs that it's corresponding version of torchvision is 0.4.1 (https://pypi.org/project/torchvision/):
Installation
We recommend Anaconda as Python package management system. Please refer to pytorch.org for the detail of PyTorch (torch) installation. The following is the corresponding torchvision versions and supported Python versions.
Installation
We recommend Anaconda as Python package management system. Please refer to pytorch.org for the detail of PyTorch (torch) installation. The following is the corresponding torchvision versions and supported Python versions.
torch torchvision python
master / nightly master / nightly >=3.6
1.5.0 0.6.0 >=3.5
1.4.0 0.5.0 ==2.7, >=3.5, <=3.8
1.3.1 0.4.2 ==2.7, >=3.5, <=3.7
1.3.0 0.4.1 ==2.7, >=3.5, <=3.7
1.2.0 0.4.0 ==2.7, >=3.5, <=3.7
1.1.0 0.3.0 ==2.7, >=3.5, <=3.7
<=1.0.1 0.2.2 ==2.7, >=3.5, <=3.7
but for some reason I have the wrong version of it:
torchvision 0.2.2 pypi_0 pypi
is there a way to install the right version of torchvision?
What I've tried:
First I tried force installing the right version with conda. Conda couldn't find the version of torchvision that I need:
$ conda install torchvision==0.4.2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision==0.4.2
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-ppc64le
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-ppc64le
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Then I proceeded to try to install it regardless with pip
$ pip install torchvision==0.4.2
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement torchvision==0.4.2 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3)
ERROR: No matching distribution found for torchvision==0.4.2
got an error too.
Is there anything else to try?
I tried but it failed:
conda install torchvision==0.4.2 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision==0.4.2
Current channels:
- https://conda.anaconda.org/pytorch/linux-ppc64le
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/linux-ppc64le
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-ppc64le
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
related:
crossposted SO: Force installing torchvision 0.4.2 when I am forced to use pytorch 1.3.1 due to hardware constraints (ppc64le IBM)
crossposted pytorch forum: https://discuss.pytorch.org/t/force-installing-torchvision/97279
crossposted reddit pytorch: https://www.reddit.com/r/pytorch/comments/iyf2qn/force_installing_torchvision/
crossposted reddit ibm: https://www.reddit.com/r/IBM/comments/iyhzex/force_installing_torchvision_042_when_i_am_forced/
real problem is installing torchmeta: https://github.com/tristandeleu/pytorch-meta/issues/95
https://www.ibm.com/mysupport/s/forumsquestion?id=0D50z00006gaxV9CAI
quora: https://www.quora.com/unanswered/How-does-one-install-specific-Python-packages-in-Conda-from-IBM-architectures
reddit ibm2: https://www.reddit.com/r/newIBM/comments/iyij10/force_installing_torchvision_042_when_i_am_forced/
gitissue for ibm: https://github.com/IBM/powerai/issues/268
gitissue in pytorch
For all details check (https://github.com/IBM/powerai/issues/268).
Make sure you have the right conda channel prepended:
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/
then install the powerai wmlce that you want e.g. 1.7.0 (most recent as of this writing):
conda create -n my_new_env python=3.7 powerai=1.7.0
conda activate my_new_env
I'm trying to set up a Anaconda environment with Python=3.4.
(base) C:\WINDOWS\system32>conda create -n py34 version=3.4
I already include the conda-forge channel, but still get this error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- version=3.4
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
When i try it with:
(base) C:\WINDOWS\system32>conda create -n py34 python=3.4 -c conda-forge
I get:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package vc conflicts for:
python=3.4 -> vc=10
Package pip conflicts for:
python=3.4 -> pip
Package vs2010_runtime conflicts for:
python=3.4 -> vs2010_runtime
I'm pretty new to Anaconda and Python and dont know what to search for anymore.
This post: Why conda cannot create environment with python=3.4 installed in it didnt help either.
Firstly you can provide more details by increasing the verbosity of the create command, which will provide useful debug messages. Each -v increases the verbosity from INFO to DEBUG to TRACE. I normally always use DEBUG because I hate seeing it just sit there when solving an environment.
conda create -v -v -v -n py34 python=3.4
I don't believe you needed to add conda-forge, the problem with your first command was that you didn't specify python=3.4, you did version=3.4. Try it without conda-forge and including python=3.4 instead.
It also looks like your conda is broken, it's failing to resolve the environments which is likely not helping the situation. Try to fix that with
conda update --all
If you are still stuck with the same problem then review the conflicts with the following commands
conda info vc
conda info pip
conda info vs2010_runtime
I believe there is a chance that some of the packages in your base are incompatible with 3.4. In this case you could try to install without any default packages
conda create --no-default-packages -n py34 python=3.4
If you are still running into issues, there is a chance there is something janky with your config files, so I would try doing a complete uninstall of anaconda on windows. And then attempt this again.
Ok, 3 days later i found out that the latest Version of Anaconda is kinda broken. I downgraded to version 4.6.14 and now everythings seems to work.
conda config --set allow_conda_downgrades true
conda install conda=4.6.14
Solving environment: failed with current_repodata.json, will retry with next repodata source. UnsatisfiableError: