0
votes

So currently, I have projects that related to Machine learning. I want to install tensorflow in my Laptop (as I know, there is a tensorflow that can run in CPU). I follow this guide https://www.tensorflow.org/versions/r0.10/get_started/os_setup#anaconda_installation I follow this guide, I do not know how to install the tensorflow module on anaconda python. I already can use the command "activate tensorflow", the command structures changes become like this:

(tensorflow) C:\Users\alfred.datui> 

but after I open python in this command line, and try to import tensorflow, it said No module named 'tensorflow'.

(tensorflow) C:\Users\alfred.datui>python
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:25:24) [MSC v
.1900 64 bit (AMD64)] on win32
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'
>>>

Please help!

1

1 Answers

0
votes

Tensorflow for Windows with CPU mode in Anaconda is quite straight forward. I will explain the steps for you.

  1. Create Anaconda Environment and enter it (You have done this already!)
  2. Inside your environment, run pip install tensorflow=1.2.0rc2 I notice that you are using python 3.6 which has only just been supported on Windows. It requires you to use the latest version of Tensorflow which is version 1.2.0rc2. You cannot run what you want with Tensorflow 0.10. Please use the latest version.
  3. You should now be able to run tensorflow.

I suggest you remove your current version of Tensorflow (although it appears that you have not installed it correctly or in the right place/environment). Then start from scratch. Alternatively, if you must use an old version of Tensorflow (not recommended without good reason) then you will need to change your python environment version to 3.5 within Anaconda as that is the only version supported until recently.