2

Actually I already installed tensorflow by using

$ pip install tensorflow

and it works well when I use

$ python
Python 2.7.15 (default, Jul 23 2018, 21:27:06) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>import tensorflow
>>>

but when I use python3 on command line

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
>>> 

it shows an error, and it shows the same error when I use IDLE

5
  • 1
    For python3, do pip3 install tensorflow Commented Sep 2, 2018 at 17:10
  • 1
    pip3 install tensorflow Commented Sep 2, 2018 at 17:11
  • well it seems that I should use $ pip3 install tensorflow, but there's another problem of my pip3, let me try to solve that problem first...... Commented Sep 2, 2018 at 17:24
  • 1
    Python 3.7 is not supported yet, check out this thread, [stackoverflow.com/questions/51337939/… Commented Sep 3, 2018 at 20:16
  • You've probably got the following error with "pip3 install tensorflow" command, 'Could not find a version that satisfies the requirement tensorflow (from versions: )' - again this version of Python is not supported Commented Sep 3, 2018 at 20:20

1 Answer 1

1

use

pip3 install tensorflow

pip installs to default python directory. pip3 installs to python3

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

Comments

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.