Cudatoolkit 9.2 unavailable

username: Chris_Palmer
cooked: <p>Trying to install pytorch 1.2 with cudatoolkit 9.2, with <code>conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch</code>. Output below. It seems that cudatoolkit 9.2 is not available in any conda channel…</p>
<pre><code class="lang-auto">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:

  - cudatoolkit=9.2

Current channels:

  - https://conda.anaconda.org/pytorch/win-64
  - https://conda.anaconda.org/pytorch/noarch
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/ostrokach-forge/win-64
  - https://conda.anaconda.org/ostrokach-forge/noarch
  - https://conda.anaconda.org/anaconda-fusion/win-64
  - https://conda.anaconda.org/anaconda-fusion/noarch
  - 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

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.
</code></pre>

username: ptrblck
cooked: <p>Could you update your <code>conda</code> and rerun the installation?</p>
<p>This is what I get in a new environment:</p>
<pre><code class="lang-python">## Package Plan ##

  environment location: /home/pbialecki/anaconda3/envs/tmp

  added / updated specs:
    - cudatoolkit=9.2
    - pytorch==1.2.0
    - torchvision==0.4.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cudatoolkit-9.2            |                0       233.9 MB
    pytorch-1.2.0              |py3.7_cuda9.2.148_cudnn7.6.2_0       371.3 MB  pytorch
    torchvision-0.4.0          |        py37_cu92         9.8 MB  pytorch
    ------------------------------------------------------------
                                           Total:       614.9 MB

The following NEW packages will be INSTALLED:

  cudatoolkit        pkgs/main/linux-64::cudatoolkit-9.2-0
  ninja              pkgs/main/linux-64::ninja-1.9.0-py37hfd86e86_0
  pytorch            pytorch/linux-64::pytorch-1.2.0-py3.7_cuda9.2.148_cudnn7.6.2_0
  torchvision        pytorch/linux-64::torchvision-0.4.0-py37_cu92
</code></pre>
<p>I thought the single <code>=</code> for <code>cudatoolkit=9.2</code> would create the issue, but apparently it’s also working like this.</p>

username: Chris_Palmer
cooked: <p>Actually, I don’t have conda in my environment, only in my base environment. Could that affect the behaviour?</p>
<p>In my fastai environment:</p>
<pre><code class="lang-auto">(fastai) g:\Confirmation&gt;conda list conda
# packages in environment at G:\Anaconda3\envs\fastai:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2019.03                  py36_0
anaconda                  custom                   py36_1
anaconda-client           1.7.2                      py_0    conda-forge
anaconda-project          0.8.3                      py_0    conda-forge
msys2-conda-epoch         20160418                      1
</code></pre>
<p>In my base environment:</p>
<pre><code class="lang-auto">(base) C:\Users\User&gt;conda list conda
# packages in environment at G:\Anaconda3:
#
# Name                    Version                   Build  Channel
conda                     4.7.12                   py36_0    conda-forge
conda-build               3.18.6                   py36_0    conda-forge
conda-package-handling    1.6.0            py36h2fa13f4_0    conda-forge
msys2-conda-epoch         20160418                      1
nb_conda                  2.2.1                    py36_0    conda-forge
nb_conda_kernels          2.2.2                    py36_0    conda-forge
</code></pre>
<p>How should I get conda into my fastai environment? I attempted <code>conda install conda</code> but it looks like it will mean a lot of extra processing to get working:</p>
<pre><code class="lang-auto">(fastai) g:\Confirmation&gt;conda install conda
Collecting package metadata (current_repodata.json): done
Solving environment: \
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - conda-forge/noarch::anaconda-client==1.7.2=py_0
  - defaults/win-64::anaconda==custom=py36_1
  - conda-forge/noarch::anaconda-project==0.8.3=py_0
  - conda-forge/win-64::bkcharts==0.2=py36_0
  - conda-forge/win-64::bokeh==1.4.0=py36_0
  - conda-forge/noarch::dask==2.7.0=py_0
  - conda-forge/noarch::dateparser==0.7.2=py_0
  - fastai/noarch::fastai==1.0.34=py_1
  - conda-forge/win-64::ipykernel==5.1.3=py36h5ca1d4c_0
  - conda-forge/noarch::ipywidgets==7.5.1=py_0
  - conda-forge/noarch::jupyter==1.0.0=py_2
  - conda-forge/noarch::jupyterlab==1.2.2=py_0
  - conda-forge/noarch::jupyterlab_server==1.0.6=py_0
  - conda-forge/win-64::jupyter_client==5.3.3=py36_1
  - conda-forge/noarch::jupyter_console==6.0.0=py_0
  - conda-forge/win-64::matplotlib==3.1.2=py36_0
  - conda-forge/win-64::matplotlib-base==3.1.2=py36h2981e6d_0
  - conda-forge/win-64::notebook==6.0.1=py36_0
  - conda-forge/win-64::pandas==0.25.3=py36he350917_0
  - conda-forge/noarch::qtconsole==4.5.5=py_0
  - conda-forge/win-64::scikit-image==0.16.2=py36he350917_0
  - conda-forge/noarch::seaborn==0.9.0=py_1
  - conda-forge/win-64::spyder==3.3.6=py36_1
  - conda-forge/win-64::spyder-kernels==0.5.2=py36_0
  - conda-forge/win-64::statsmodels==0.10.1=py36hfa6e2cd_1
  - conda-forge/win-64::widgetsnbextension==3.5.1=py36_0
  - defaults/win-64::_anaconda_depends==2019.03=py36_0
done

## Package Plan ##

  environment location: G:\Anaconda3\envs\fastai

  added / updated specs:
    - conda


The following NEW packages will be INSTALLED:

  conda              conda-forge/win-64::conda-4.7.12-py36_0
  conda-package-han~ conda-forge/win-64::conda-package-handling-1.6.0-py36h2fa13f4_0
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.1-py_0


Proceed ([y]/n)?
</code></pre>

username: ptrblck
cooked: <p>I’m really not sure, as I usually just create new environments via:</p>
<pre><code class="lang-auto">conda create -n new_env_name Python=3.7 Anaconda
</code></pre>
<p>which installs a lot of other packages (e.g. pandas etc.).</p>

username: Chris_Palmer
cooked: <p>Yes, I’ll do that - starting from scratch usually fixes things <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>

username: Chris_Palmer
cooked: <p>Here is what I’ve done (thought I would try with Pytorch 1.3):</p>
<p><code>conda create -n pytorch_1_3 Python=3.6.9 Anaconda pip</code><br>
<code>conda activate pytorch_1_3</code></p>
<pre><code class="lang-auto">(pytorch_1_3) C:\Users\User&gt;conda list conda
# packages in environment at G:\Anaconda3\envs\pytorch_1_3:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2019.03                  py36_0
anaconda                  custom                   py36_1
anaconda-client           1.7.2                      py_0    conda-forge
anaconda-project          0.8.3                      py_0    conda-forge
msys2-conda-epoch         20160418                      1
</code></pre>
<p><strong>Still no conda in my actual installation, but try the Pytorch installation anyway…</strong></p>
<pre><code class="lang-auto">(pytorch_1_3) C:\Users\User&gt;conda install pytorch==1.3.0 torchvision cudatoolkit==9.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:

  - cudatoolkit==9.2

Current channels:

  - https://conda.anaconda.org/pytorch/win-64
  - https://conda.anaconda.org/pytorch/noarch
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/ostrokach-forge/win-64
  - https://conda.anaconda.org/ostrokach-forge/noarch
  - https://conda.anaconda.org/anaconda-fusion/win-64
  - https://conda.anaconda.org/anaconda-fusion/noarch
  - 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/fastai/win-64
  - https://conda.anaconda.org/fastai/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.
</code></pre>
<p><strong>OK, try to install conda here…</strong></p>
<pre><code class="lang-auto">(pytorch_1_3) C:\Users\User&gt;conda install conda
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: G:\Anaconda3\envs\pytorch_1_3

  added / updated specs:
    - conda


The following NEW packages will be INSTALLED:

  conda              conda-forge/win-64::conda-4.7.12-py36_0
  conda-package-han~ conda-forge/win-64::conda-package-handling-1.6.0-py36h2fa13f4_0
  tqdm               conda-forge/noarch::tqdm-4.37.0-py_0


Proceed ([y]/n)?
</code></pre>
<p><strong>That worked. However the repeat of the Pytorch installation command didn’t produce any better outcome, until I used the entire suggested command from the Pytorch site:</strong></p>
<pre><code class="lang-auto">(pytorch_1_3) C:\Users\User&gt;conda install pytorch torchvision cudatoolkit=9.2 -c pytorch -c defaults -c numba/label/dev
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: G:\Anaconda3\envs\pytorch_1_3

  added / updated specs:
    - cudatoolkit=9.2
    - pytorch
    - torchvision


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2019.10.16 |                0         163 KB
    certifi-2019.9.11          |           py36_0         155 KB
    cudatoolkit-9.2            |                0       349.0 MB  numba/label/dev
    ninja-1.9.0                |   py36h74a9793_0         238 KB
    openssl-1.1.1d             |       he774522_3         5.7 MB
    pytorch-1.3.1              |py3.6_cuda92_cudnn7_0       396.9 MB  pytorch
    torchvision-0.4.2          |        py36_cu92         6.1 MB  pytorch
    ------------------------------------------------------------
                                           Total:       758.2 MB

The following NEW packages will be INSTALLED:

  cudatoolkit        numba/label/dev/win-64::cudatoolkit-9.2-0
  ninja              pkgs/main/win-64::ninja-1.9.0-py36h74a9793_0
  pytorch            pytorch/win-64::pytorch-1.3.1-py3.6_cuda92_cudnn7_0
  torchvision        pytorch/win-64::torchvision-0.4.2-py36_cu92

The following packages will be UPDATED:

  ca-certificates    conda-forge::ca-certificates-2019.9.1~ --&gt; pkgs/main::ca-certificates-2019.10.16-0
  openssl            conda-forge::openssl-1.1.1d-hfa6e2cd_0 --&gt; pkgs/main::openssl-1.1.1d-he774522_3

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi                                       conda-forge --&gt; pkgs/main


Proceed ([y]/n)?y

Downloading and Extracting Packages
certifi-2019.9.11    | 155 KB    | ################################################################################## | 100%
cudatoolkit-9.2      | 349.0 MB  | ################################################################################## | 100%
torchvision-0.4.2    | 6.1 MB    | ################################################################################## | 100%
pytorch-1.3.1        | 396.9 MB  | ################################################################################## | 100%
ca-certificates-2019 | 163 KB    | ################################################################################## | 100%
ninja-1.9.0          | 238 KB    | ################################################################################## | 100%
openssl-1.1.1d       | 5.7 MB    | ################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
</code></pre>

username: ptrblck
cooked: <p>Good to hear you were able to install it!<br>
It seems the mentioned command is necessary for Windows machines, while I was checking it on Linux. <img src="https://discuss.pytorch.org/images/emoji/apple/confused.png?v=9" title=":confused:" class="emoji" alt=":confused:"></p>

username: Chris_Palmer
cooked: <p>Ah Hah - we got there in the end <img src="https://discuss.pytorch.org/images/emoji/apple/laughing.png?v=9" title=":laughing:" class="emoji" alt=":laughing:"> Thanks for everything! A big take-away for me is to install conda early on in an environment, so I am up-to-date there even if not in my base environment</p>

username: mark-fangzhou-xie
cooked: <p>Actually I am using Ubuntu but I face a similar error, saying that cudatoolkit 10.1 is not available in any channel. My pytorch was installed in my conda (base), but I would like to also install pytorch in my newly-created env (dnn).</p>
<pre><code class="lang-auto">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:

  - cudatoolkit=10.1

Current channels:

  - https://conda.anaconda.org/pytorch/linux-64
  - https://conda.anaconda.org/pytorch/noarch
  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/conda-forge/label/dev/linux-64
  - https://conda.anaconda.org/conda-forge/label/dev/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.
</code></pre>
<p>This env is fresh and clean and I have been looking for a solution for quite a while but with no success.</p>

username: mark-fangzhou-xie
cooked: <p>Problem solved. I deleted Anaconda completely and started a fresh installation. This time it works perfectly. I think I have messed up my base env and that could be the reason.</p>
<p>Thank you!</p>