Issue creating GPU env - tensorflow package not found

I’m trying to install DLC on a computer with an NVIDIA Quadro RTX 4000 GPU running windows 10. I’m running into a problem when trying to create the DLC-GPU environment using the .yaml, having cloned the DLC repo. When I try to do so I get the following error:

Solving environment: failed


  • tensorflow-gpu==1.15.5

My assumption is that this is something to do with the installed driver or CUDA as you say in your documentation that TensorFlow 1.13.1 is installed inside the env (and I therefore haven’t separately installed TensorFlow, which I believe is unnecessary?) But I’ve installed the oldest driver version I could find for this GPU which is 426.50. nvidia-smi says that this is CUDA version 10.1, and I separately installed CUDA version 10 (so nvcc -V gives V10.0.130).

I’m sure I’m missing something obvious - since this is the step most people apparently struggle with! - but I’d appreciate any guidance. Thanks for your time.

Check if you have any tensorflow-gpu installed. You can conda list tensorflow-gpu in your environment.

If not installed, use pip install tensorflow-gpu==input_version_here

Thanks Konrad. Doesn’t look like I have any tensorflow-gpu installed in the environment. If I try pip install I get this:

ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.15.5 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1)
ERROR: No matching distribution found for tensorflow-gpu==1.15.5

EDIT: I think it’s because the version of python I have installed in that environment is 3.8.5 and I just realised that tensorflow only supports up to v 3.7…Will try changing the version and see if that fixes the problem.

So I have an environment set up with python 3.7.9. When I check if tensorflow-gpu is installed it doesn’t seem to be (conda list tensorflow-gpu gives a table with name, version, etc. but it’s empty).

If I pip install tensorflow-gpu==1.15.5, I get a bunch of lines beginning with ‘requirement already satisfied’ (maybe tensorflow is somehow installed in the wrong place?)

If I cd to where the conda environments are and try creating it (conda env create -f DLC-GPU.yaml) I still get:


  • tensorflow-gpu==1.15.5

I’m sure I’m being dense and missing something obvious (I don’t have lots of experience with conda environments) but thanks for any assistance.

I’m not sure if I follow what you did correctly.The python version is specified in the dependecies in the yaml file. Maybe fresh install Anaconda if you’re not sure about what you have in there.

Try it like this:

  1. Open Anaconda terminal as administrator (if on Windows, on Linux just open it)
  2. cd to conda-environments folder
  3. conda env create -f DLC-GPU.yaml

Don’t activate any environment, just follow the steps exactly.

If I follow your steps exactly I get the same error as initially reported (I attach a screenshot so you can see that I’ve followed the steps):

Hi @lauragrima, it still uses Python 3.8.X, explaining the failure. You said you had an environment set up with 3.7.9; activate it first to make sure you do work with that local Python, rather than ‘base’ :slight_smile:

Or just reinstall python for older version if the only thing you use is DLC

Sorry for the miscommunication, but this is what I said in the previous post before my last one: that I do have an environment with python 3.7.9, and that I followed the same steps as in the instructions but with that environment activated and I got the same error. I didn’t do it in that environment this time (in the screenshot) because I wanted to follow the exact steps Konrad outlined in his previous post, but I have definitely done it with python 3.7.9 activated and it still says the same thing about tensorflow. (I can post a screenshot shortly – I don’t have access to the computer again until later today but wanted to post this now in case you had any other advice or ideas).

I’d rather set everything up in a separate environment as I am running other python-dependent software on this computer.

Thanks again for your patience with helping me out on this.

EDIT: Just adding the screenshot here in case it’s helpful.

Can you try (as admin of course, always open terminal as admin):

conda create -n temp python=3.7.5

conda activate temp

When in that env cd to conda-environments and conda env create -f DLC-GPU.yaml - this will take a while probably, just wait for new line to pop up.

This should create envrionment called DLC-GPU. Now you can:

conda deactivate

conda remove --name temp --all so you don’t have this, now useless, environment lying around.

Then use conda activate DLC-GPU and that’s it, you have your DLC installed in it’s own environment, so go ahead and python -m deeplabcut to open GUI :]

Let me know if this worked

Thanks Konrad. This is what I get if I try to create a temp environment:

You’re missing a = in your first command. It should be
conda create -n temp python=3.7.5

With this command, you’re creating a new environment with the name “temp” that will have python version 3.7.5

By forgetting the equal sign, you asked for a new environment called “temp” that has python compatible with a non-existent 3.7.5 library.
(official docs)

Thanks for catching that William! Clearly I need more coffee…

Konrad, followed your steps to create the temp environment which now worked. Then cd to conda-environments, created DLC-GPU environment, and same tensorflow error as before.

python -V gives 3.7.5 as expected. I think this step of creating the temp environment is exactly what I did when creating the environment with python 3.7.9.

I also tried checking if tensorflow is installed, and did pip install tensorflow-gpu==1.15.5 as you first suggested - but in this temp env. Still getting the same error.

Can you edit DLC-GPU.yaml and change the tensorflow-gpu version to 1.15? Then try creating the environment again.

I don’t see 1.15.5 as an option at
Similarly, the TensorFlow pip install instructions suggest 1.15, so I wonder if this was a mistake.

Good catch @WillGiang it should be moved to pip dependencies (in the yaml file) if the version is 1.15.5. To install with conda change to 1.15.0

Anyway, use either of those solutions to modify DLC-GPU.yaml and then everything should be working as intended

Tagging @jeylau for pr on this

Moved it to pip dependencies with 1.15.5 and it worked! Thanks so much for catching that @WillGiang. And for your help @Konrad_Danielewski.