Pipidu83
Pipidu83

Reputation: 21

Cannot import tensorflow: No module named 'tensorflow'

getting the below when trying to import tensorflow:

import tensorflow

Traceback (most recent call last): File "", line 1, in File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 20, in do_import module = self._system_import(name, *args, **kwargs) ModuleNotFoundError: No module named 'tensorflow'

Upvotes: 2

Views: 728

Answers (2)

Vineeth Sai
Vineeth Sai

Reputation: 3447

If you're using Windows. You need to install Python x64(64bit) version from here.

Once that's done you need to start command line (Windows + R) enter cmd.

In that cmd type pip install tensorflow.

Then you can restart your shell and test it with

import tensorflow

If you're on Ubuntu(Linux) then pip3 install tensorflow will do the job.

Upvotes: 0

Cut7er
Cut7er

Reputation: 1237

did you use pip install tensorflow in your command line before trying to import it?

Upvotes: 0

Related Questions