Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow GPU - Spyder

I am having a problem with importing tensorflow GPU on spyder. This is what I get when I type import tensorflow on iPython using Spyder 3 (on MacOS)

enter image description here

When I checked what packages I have within tensorflow I get this list, which I see that iPython, and Spyder are not included.

enter image description here

Also in anaconda, when I click on tensorflow in Environments, I have the option to open it with Python, with terminal, but not with iPython or Spyder (or Jupyter)

enter image description here

I would very much appreciate any help.

UPDATE 1:

Ok I managed to get Spyder on tensorflow's ENV but when I run the command 'import tensorflow' on iPython I get this error (when I run the same command on Python's tab everything seems to work just fine.

enter image description here

like image 912
Jespar Avatar asked Jan 20 '17 13:01

Jespar


People also ask

Can I run TensorFlow on GPU?

Note: TensorFlow with GPU access is supported for WSL2 on Windows 10 19044 or higher. This corresponds to Windows 10 version 21H2, the November 2021 update. You can get the latest update from here: Download Windows 10. For instructions, see Install WSL2 and NVIDIA's setup docs for CUDA in WSL.

Does Python 3.9 support TensorFlow GPU?

The TensorFlow Python API supports Python 2.7 and Python 3.3+. The GPU version works best with Cuda Toolkit 7.5 and cuDNN v5. Other versions are supported (Cuda toolkit >= 7.0 and cuDNN >= v3) only when installing from sources.

Does Spyder support TensorFlow?

you can install tensorflow through conda in one command. in Spyder: import tensorflow as tf. and you're good to go.

Does Python 3.8 support TensorFlow GPU?

Tensorflow does not support Python 3.8 at the moment. The latest supported Python version is 3.7. A solution is to install Python 3.7, this will not affect your codes since Python 3.7 and 3.8 are very similar.


1 Answers

Finally I solved this mystery. If you have installed Spyder from the Anaconda, go to the Anaconda launcher. There go to environments, you will see two of them: root and tensorflow. The latter one is created due to the instructions by tensorflow.org. Just run all those instructions on the root, don't activate tensorflow environment, it will work. Everything will be available in spyder.

like image 168
Aamir M. Khan Avatar answered Oct 06 '22 01:10

Aamir M. Khan