0

I am trying to use tensorflow for use with unity ml-agents. I followed the setup instructions which can be found here as far as "creating the conda environment". I managed to run the conda create command succesfully, activate tensorflow, install tensorflow and finally to launch python.

But when I run this command "import tensorflow as tf" I get an error as a result of my machine having no GPU present. I am working on the assumption that using the CUDA_VISIBLE_DEVICES environment variable will solve this problem and force the use of the CPU but I'm not exactly sure how to input the variable.

Can anyone tell me exactly how this should appear in the environment variables interface? Or does anyone have any other idea about how to set this up properly?

Thanks In advance

talonmies
  • 70,661
  • 34
  • 192
  • 269
  • 1
    If you have no GPU, then use a tensorflow build that does not depend on a GPU. Trying to use `CUDA_VISIBLE_DEVICES` here will not help. – Robert Crovella Jan 17 '18 at 00:58
  • Thanks so much for the help. Can you please recommend a tensorflow build that will work without a GPU and will work with Unity ML-Agents? – Ryan Sullivan Jan 17 '18 at 01:01
  • Ok, I solved this for anyone who encounters the same problem. Simply pip install "tensorflow" instead of "tensorflow-gpu". – Ryan Sullivan Jan 17 '18 at 01:35

1 Answers1

0

Uninstall tensorflow

Pip uninstall tensorflow

or

pip uninstall tensorflow-gpu

depends upon what you have installed then

pip install tensorflow

or if you want to install a specific version

pip install tensoflow==[version]

MUK
  • 371
  • 4
  • 13