Please help me with this error
I have installed the tensorflow module on my server and below is it's information
15IT60R19@cpusrv-gpu-109:~$ pip show tensorflow Name: tensorflow Version: 1.0.0 Summary: TensorFlow helps the tensors flow Home-page: http://tensorflow.org/ Author: Google Inc. Author-email: [email protected] License: Apache 2.0 Location: /home/other/15IT60R19/anaconda2/lib/python2.7/site-packages Requires: mock, numpy, protobuf, wheel, six
But when I try to import tensorflow I get following error
>>> import tensorflow as tf Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named tensorflow
My python version is as following
Python 2.7.12 |Anaconda 2.5.0 (64-bit)| (default, Jul 2 2016, 17:42:40) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org
I have tried the solutions given in sol1
Sol2
I do not have sudo access to the server I can only use pip to install any module
The Python "ModuleNotFoundError: No module named 'tensorflow'" occurs when we forget to install the tensorflow module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install tensorflow command.
Try installing tensorflow again with the whatever version you want and with option --ignore-installed like:
pip install tensorflow==1.2.0 --ignore-installed
I solved same issue using this command.
I had a more basic problem when I received this error.
The "Validate your installation" instructions say to type: python
However, I have both 2.7 and 3.6 installed. Because I used pip3 to install tensorflow, I needed to type: python3
Using the correct version, I could import the "tensorflow" module.
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