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)
When I checked what packages I have within tensorflow I get this list, which I see that iPython, and Spyder are not included.
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)
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.
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.
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.
you can install tensorflow through conda in one command. in Spyder: import tensorflow as tf. and you're good to go.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With