0

Pip Installed tensor flow (CPU only... https://www.tensorflow.org/install/install_windows) in an anaconda environment, says it successfully installed but when I go to use tensor flow (with environment activated) it displays an error saying "ImportError: No module named 'tensorflow'".

However, After i installed pandas package, and it successfully runs. i ran an update to python=3.5 for the environment (because my anaconda is 2.7 version), and tried using this link https://github.com/tensorflow/tensorflow/issues/6136 for help also. Weird that other packages run but not tensor flow. Using a PC windows 10 with intel CPU and amd graphics. Any suggestions would be helpful.

2
  • I'm not sure about windows, but on some Linux distros (if not all) pip3 is required for installing 3.x packages. Are you trying to import using a 2.x or 3.x interpreter? You should try both, and maybe see what interpreters you have installed because often installing anaconda installs it's own interpreter. I.e.: standard Python 2.x and 3.x interpreters in your system files and another interpreter in the anaconda directory. Commented May 18, 2017 at 2:39
  • 1
    In addition to what Darrel has said I would suggest creating a new environment and make sure it is python=3.5 then pip install tensorflow. Once that is complete run conda list in your activated environment to see whether it is recognised as installed by conda. I've not had any issues on windows apart from a slight .whl issue. It should work! Commented May 18, 2017 at 9:40

2 Answers 2

1
  1. First check which environment you are using right now.
  2. If it helps open the anaconda navigator and see whether you have TensorFlow installed in the "installed" tab of that particular environment.
  3. Check the following on jupyter noteook and see what python version you're using in that environment because the environment that you are using might have a different python version after all.
from platform import python_version print(python_version()) 
  1. If the versions are different, try removing the TensorFlow installation and reinstalling it according to your python version. environment and recreating the same environment pip install --ignore-installed --upgrade tensorflow=='version_for_your_requirement"

  2. If the situation is still there, https://www.youtube.com/watch?v=tPq6NIboLSc see here the steps followed in the video. Though its a slightly different scenario, you will get the gist of it pretty quickly as to how we can make another environment for our work and about installing TensorFlow properly.

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

Comments

0

Tensorflow supports 64-bit Python version. Make sure you have installed 64-bit Python 3.5/3.6/3.8 version. Install Tensorflow using following steps

#check current python version python --version #Create the virtual environment conda create -n tf python=PYTHON_VERSION #Activate the tf environment conda activate tf #Install Tensorflow pip install tensorflow 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.