0
votes

Hi I am using Jupyter notebook to run my python script.I did all the steps to install tensorflow. When I do list env I see tensorflow installed but when I write a script using tensor flow. I get the following error.

ImportError                               Traceback (most recent call last)
<ipython-input-1-b2d6c7d62f65> in <module>()
      2 import numpy as np
      3 #import tflearn
----> 4 import tensorflow as tf
      5 import tflearn
      6 #from tflearn.data_utils import to_categorical

ImportError: No module named 'tensorflow'

Can anyone please help in how to debug

I have followed the following steps 1.conda create --name test python=3.5 2.activate test 3.conda install numpy matplotlib pandas jupyter notebook 4. conda install tensorflow scipy

all the installations were successfull. Except in hdf5 i got error saying revuild using conda > 2.0

1
Try installing tensorflow with pip not conda as the conda version is not supported by the devs. Can you give more information on your OS and confirm youa re only using CPU version? - JCooke

1 Answers

0
votes

If you're trying to import tensorflow in ipython, you should also make sure that ipython is installed in the same environment. And if you run

ipython notebook

This will launch the default ipython (/usr/bin/ipython). You don't want that. So, run venv/bin/ipython instead