1

My PC is 64 bit and python version is 3.7.9. I installed tensorflow as following. Does anyone know how to solve it? Let me know if further information is needed. enter image description here

Edit:

I also tried anaconda as follow:

https://www.tutorialspoint.com/tensorflow/tensorflow_installation.htm

But the problem is that in anaconda prompt, I can import tensorflow. I use python in visual studio 2017. When I open python file in VS, it seems different with anaconda prompt. Do you know how to make it also work in VS?

7
  • 1
    python -m pip install tensorflow Commented Dec 17, 2021 at 15:43
  • @sahasrara62 same error Commented Dec 17, 2021 at 16:30
  • @eshirvana same error Commented Dec 17, 2021 at 16:30
  • are you using the private network (company laptop)or public one (own laptop) ? otherwise download a whl distributed file and install from that Commented Dec 17, 2021 at 16:37
  • @sahasrara62 it is my personal computer and I can install anything I want. Do you mean tensorflow-1.13.1-cp37-cp37m-win_amd64.whl? I tried and showed the error in the above picture. Commented Dec 17, 2021 at 17:00

2 Answers 2

1

The version of Python your using is too new for the version of TensorFlow your using.

If you go here: https://pypi.org/project/tensorflow/1.13.1/, and look on the left hand side and scroll down to "Programming Language", you will see the latest python version on that list is Python 3.6.

That is the cause of error your getting. You can either:

  • Switch to Python 3.6 or
  • Use TensorFlow 1.14.0 or above which supports Python 3.7

Also make sure your using the 64-bit version of Python. TensorFlow will not install if you have the 32-bit version of Python installed.

Sign up to request clarification or add additional context in comments.

4 Comments

I tried pip install tensorflow==1.14.0 and got the same error.
Do you know if your python is the 32 or 64 bit version? It needs to be the 64-bit version.
you are right, I incorrectly used the python 32 bit. Now everything works. I installed tensorflow 2.7. So I needn't install Keras, right?
Yes, with TensorFlow 2.x, you can use tf.keras included with TensorFlow
0

Could you try: pip install --upgrade tensorflow

1 Comment

sorry, I got the same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.