TensorFlow from anaconda channel downgrades gpu to mkl version

I have created an environment and installed TensorFlow with the command:

conda install -c anaconda tensorflow=*=gpu_py310h5ade2b3_0 cudatoolkit cudnn

And it installs the latest TensorFlow version available on the anaconda channel.
The output of conda info below:


     active environment : tensorflow
    active env location : C:\ProgramData\scoop\apps\miniconda3\current\envs\tensorflow
            shell level : 1
       user config file : C:\Users\Otávio Augusto Silva\.condarc
 populated config files : C:\Users\Otávio Augusto Silva\.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.13.final.0
       virtual packages : __cuda=11.7=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\ProgramData\scoop\apps\miniconda3\current  (writable)
      conda av data dir : C:\ProgramData\scoop\apps\miniconda3\current\etc\conda
  conda av metadata url : None
           channel URLs : 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
          package cache : C:\ProgramData\scoop\apps\miniconda3\current\pkgs
                          C:\Users\Otávio Augusto Silva\.conda\pkgs
                          C:\Users\Otávio Augusto Silva\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\scoop\apps\miniconda3\current\envs
                          C:\Users\Otávio Augusto Silva\.conda\envs
                          C:\Users\Otávio Augusto Silva\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.13 Windows/10 Windows/10.0.22000
          administrator : True
             netrc file : None
           offline mode : False


But when I try to update everything by using the command conda update --all the following happens:

The following packages will be DOWNGRADED:

  tensorflow                      2.9.1-gpu_py310h5ade2b3_0 --> 2.9.1-mkl_py310h0b323c9_0 None
  tensorflow-base                 2.9.1-gpu_py310h9761872_0 --> 2.9.1-mkl_py310h6a7f48e_0 None

The question is, how do I prevent conda update from downgrading TensorFlow and keep the GPU version?

dear tavioasilva.

Thank you for your contribution to the anaconda community.

The following is written in both Lithuanian and English.

> The question is, how do I prevent conda update from downgrading TensorFlow and keep the GPU version?

English:
The solution to this problem is simple.

netrc file : None
offline mode : False

You can change this part.

Lietuviškai:
Šios problemos sprendimas yra paprastas.

netrc file : None
offline mode : False

Galite pakeisti šią dalį.

Best regards.

I’m sorry, but I don’t understand what exactly you mean by that. Could you elaborate further?

dear otavioasilva.

thank you for your reply.

It seems that you live in the Portuguese zone, so the following is explained in Portuguese.

netrc : False

Quando isso é exibido nas configurações do Tensorflow, o Python que baixa o Tensorflow e o curl que é a base dele tentará fazer o download com uma configuração chamada Anonymous.

Contudo,

conda install -c anaconda tensorflow-mkl

tensorflow-mkl, instalado com o comando, requer um login anaconda (mesmo para usuários profissionais).

Portanto, consulte o site a seguir e defina .netrc ou _netrc para que você possa efetuar login no servidor de distribuição anacoda corretamente.

Atenciosamente.

URL:.netrc - Everything curl

Hello, sorry for the delay. The problem is not the language here, I just don’t understand how that can help me. I found out a workaround by doing conda update --all tensorflow==2.9.1=gpu_py310* and it’s been working so far. I just need the Anaconda devs to be aware of this and find a more permanent solution, since the tensorflow-gpu package is very outdated.