How to Setup a Python Environment for Machine Learning and Deep Learning with Anaconda

It can be difficult to install a Python machine learning environment on some platforms.

Python itself must be installed first and then there are many packages to install, and it can be confusing for beginners.

In this tutorial, you will discover how to set up a Python machine learning development environment using Anaconda.

After completing this tutorial, you will have a working Python environment to begin learning, practicing, and developing machine learning and deep learning software.

These instructions are suitable for Windows, Mac OS X, and Linux platforms. I will demonstrate them on OS X, so you may see some mac dialogs and file extensions.

  • Update Mar/2017: Added note that you only need one of Theano or TensorFlow to use Kears for Deep Learning.
How to Setup a Python Environment for Machine Learning and Deep Learning with Anaconda

How to Setup a Python Environment for Machine Learning and Deep Learning with Anaconda

Overview

In this tutorial, we will cover the following steps:

  1. Download Anaconda
  2. Install Anaconda
  3. Start and Update Anaconda
  4. Update scikit-learn Library
  5. Install Deep Learning Libraries

1. Download Anaconda

In this step, we will download the Anaconda Python package for your platform.

Anaconda is a free and easy-to-use environment for scientific Python.

Click Anaconda and Download

Click Anaconda and Download

  • 3. Choose the download suitable for your platform (Windows, OSX, or Linux):
    • Choose Python 3.5
    • Choose the Graphical Installer
Choose Anaconda Download for Your Platform

Choose Anaconda Download for Your Platform

This will download the Anaconda Python package to your workstation.

I’m on OS X, so I chose the OS X version. The file is about 426 MB.

You should have a file with a name like:

2. Install Anaconda

In this step, we will install the Anaconda Python software on your system.

This step assumes you have sufficient administrative privileges to install software on your system.

  • 1. Double click the downloaded file.
  • 2. Follow the installation wizard.
Anaconda Python Installation Wizard

Anaconda Python Installation Wizard

Installation is quick and painless.

There should be no tricky questions or sticking points.

Anaconda Python Installation Wizard Writing files

Anaconda Python Installation Wizard Writing Files

The installation should take less than 10 minutes and take up a little more than 1 GB of space on your hard drive.

3. Start and Update Anaconda

In this step, we will confirm that your Anaconda Python environment is up to date.

Anaconda comes with a suite of graphical tools called Anaconda Navigator. You can start Anaconda Navigator by opening it from your application launcher.

Anaconda Navigator GUI

Anaconda Navigator GUI

You can learn all about the Anaconda Navigator here.

You can use the Anaconda Navigator and graphical development environments later; for now, I recommend starting with the Anaconda command line environment called conda.

Conda is fast, simple, it’s hard for error messages to hide, and you can quickly confirm your environment is installed and working correctly.

  • 1. Open a terminal (command line window).
  • 2. Confirm conda is installed correctly, by typing:

You should see the following (or something similar):

  • 3. Confirm Python is installed correctly by typing:

You should see the following (or something similar):

Confirm Conda and Python are Installed

Confirm Conda and Python are Installed

If the commands do not work or have an error, please check the documentation for help for your platform.

See some of the resources in the “Further Reading” section.

  • 4. Confirm your conda environment is up-to-date, type:

You may need to install some packages and confirm the updates.

  • 5. Confirm your SciPy environment.

The script below will print the version number of the key SciPy libraries you require for machine learning development, specifically: SciPy, NumPy, Matplotlib, Pandas, Statsmodels, and Scikit-learn.

You can type “python” and type the commands in directly. Alternatively, I recommend opening a text editor and copy-pasting the script into your editor.

Save the script as a file with the name: versions.py.

On the command line, change your directory to where you saved the script and type:

You should see output like the following:

What versions did you get?
Paste the output in the comments below.

Confirm Anaconda SciPy environment

Confirm Anaconda SciPy environment

4. Update scikit-learn Library

In this step, we will update the main library used for machine learning in Python called scikit-learn.

  • 1. Update scikit-learn to the latest version.

At the time of writing, the version of scikit-learn shipped with Anaconda is out of date (0.17.1 instead of 0.18.1). You can update a specific library using the conda command; below is an example of updating scikit-learn to the latest version.

At the terminal, type:

Update scikit-learn in Anaconda

Update scikit-learn in Anaconda

Alternatively, you can update a library to a specific version by typing:

Confirm the installation was successful and scikit-learn was updated by re-running the versions.py script by typing:

You should see output like the following:

What versions did you get?
Paste the output in the comments below.

You can use these commands to update machine learning and SciPy libraries as needed.

Try a scikit-learn tutorial, such as:

5. Install Deep Learning Libraries

In this step, we will install Python libraries used for deep learning, specifically: Theano, TensorFlow, and Keras.

NOTE: I recommend using Keras for deep learning and Keras only requires one of Theano or TensorFlow to be installed. You do not need both! There may be problems installing TensorFlow on some Windows machines.

  • 1. Install the Theano deep learning library by typing:

  • 2. Install the TensorFlow deep learning library (all except Windows) by typing:

Alternatively, you may choose to install using pip and a specific version of tensorflow for your platform.

See the installation instructions for tensorflow.

  • 3. Install Keras by typing:

  • 4. Confirm your deep learning environment is installed and working correctly.

Create a script that prints the version numbers of each library, as we did before for the SciPy environment.

Save the script to a file deep_versions.py. Run the script by typing:

You should see output like:

Anaconda Confirm Deep Learning Libraries

Anaconda Confirm Deep Learning Libraries

What versions did you get?
Paste your output in the comments below.

Try a Keras deep learning tutorial, such as:

Further Reading

This section provides some links for further reading.

Summary

Congratulations, you now have a working Python development environment for machine learning and deep learning.

You can now learn and practice machine learning and deep learning on your workstation.

How did you go?
Let me know in the comments below.


Frustrated With Python Machine Learning?

Master Machine Learning With Python

Develop Your Own Models in Minutes

…with just a few lines of scikit-learn code

Discover how in my new Ebook:
Machine Learning Mastery With Python

Covers self-study tutorials and end-to-end projects like:
Loading data, visualization, modeling, tuning, and much more…

Finally Bring Machine Learning To
Your Own Projects

Skip the Academics. Just Results.

Click to learn more.


269 Responses to How to Setup a Python Environment for Machine Learning and Deep Learning with Anaconda

  1. Lucky Chinedu Ekechi March 13, 2017 at 10:02 am #

    Here is my output after installation:

    theano: 0.8.2
    tensorflow: 1.0.1
    Using TensorFlow backend.
    keras: 1.2.2

    • Jason Brownlee March 13, 2017 at 10:30 am #

      Very nice!

      • Nitin Gavai April 22, 2017 at 5:49 am #

        theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
        tensorflow: 1.0.0
        Using TensorFlow backend.
        keras: 2.0.3

        • Jason Brownlee April 22, 2017 at 9:28 am #

          Very nice work Nitin.

          • Shirley Yang June 23, 2017 at 10:30 am #

            theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
            tensorflow: 0.12.1
            Using TensorFlow backend.
            keras: 2.0.5

          • Jason Brownlee June 24, 2017 at 7:55 am #

            Nice work Shirley.

      • Sandsh August 8, 2017 at 1:54 am #

        i saw this “syntax invalid syntax

    • Deepak August 18, 2017 at 2:43 pm #

      One of the amazing documentation on Machine Learning. Thanks a lot.

    • Dustin Bunch September 15, 2017 at 7:03 am #

      theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
      tensorflow: 1.3.0
      Using TensorFlow backend.
      keras: 2.0.8

  2. Nico March 13, 2017 at 12:28 pm #

    Command line is not working for Windows user.
    Where i can find command for windows?

    Thx

    • Jason Brownlee March 14, 2017 at 8:11 am #

      It has been more than a decade since I have used Windows.

      Maybe it’s called command prompt or terminal?

    • Nico March 14, 2017 at 12:16 pm #

      It’s okay Mr. Jason.
      I found it already.

      Thx

      • Jason Brownlee March 15, 2017 at 8:06 am #

        Glad to hear it Nico.

        • Robin Riezebos June 6, 2017 at 9:35 pm #

          you can try to use command prompt (cmd.exe) or alternatively use git-bash. it’s a more versatile version of cmd

    • Nandakumar April 18, 2017 at 1:06 pm #

      Have you tried adding the Python path in the environment variables ?

  3. Nguyen Lam March 13, 2017 at 1:34 pm #

    I install the windows version and I cannot install tensorflow pakage. The Python version is 3.6.0 and tensorflow is compatible with Python 3.5 only.

    • Tom Kelly March 14, 2017 at 5:40 am #

      Same

      • Jason Brownlee March 14, 2017 at 8:31 am #

        Consider using Keras with Theano, everything will work perfectly.

    • Jason Brownlee March 14, 2017 at 8:12 am #

      To use Keras, you only need TensorFlow OR Theano. If you have installed Theano, you can start using Keras.

    • Harsha May 13, 2017 at 10:46 am #

      conda install python=3.5
      and it is successfully working on that.

  4. Steven March 14, 2017 at 2:59 am #

    I have installed theano and tensorflow, while the errors pop out when installing keras.

    C:\Users\stevenwsy>pip install keras
    Collecting keras
    Using cached Keras-1.2.2.tar.gz
    Requirement already satisfied: theano in c:\users\stevenwsy\lib\site-packages (from keras)
    Requirement already satisfied: pyyaml in c:\users\stevenwsy\lib\site-packages (from keras)
    Requirement already satisfied: six in c:\users\stevenwsy\lib\site-packages (from keras)
    Requirement already satisfied: numpy>=1.7.1 in c:\users\stevenwsy\lib\site-packages (from theano->keras)
    Requirement already satisfied: scipy>=0.11 in c:\users\stevenwsy\lib\site-packages (from theano->keras)
    Exception:
    Traceback (most recent call last):
    File “C:\Users\stevenwsy\lib\site-packages\pip\basecommand.py”, line 215, in main
    status = self.run(options, args)
    File “C:\Users\stevenwsy\lib\site-packages\pip\commands\install.py”, line 335, in run
    wb.build(autobuilding=True)
    File “C:\Users\stevenwsy\lib\site-packages\pip\wheel.py”, line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File “C:\Users\stevenwsy\lib\site-packages\pip\req\req_set.py”, line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File “C:\Users\stevenwsy\lib\site-packages\pip\req\req_set.py”, line 666, in _prepare_file
    check_dist_requires_python(dist)
    File “C:\Users\stevenwsy\lib\site-packages\pip\utils\packaging.py”, line 48, in check_dist_requires_python
    feed_parser.feed(metadata)
    File “C:\Users\stevenwsy\lib\email\feedparser.py”, line 177, in feed
    self._input.push(data)
    File “C:\Users\stevenwsy\lib\email\feedparser.py”, line 101, in push
    parts = data.splitlines(True)
    AttributeError: ‘NoneType’ object has no attribute ‘splitlines’

  5. Steven March 14, 2017 at 3:04 am #

    The output looks OK for versions.py, shown as follows

    C:\Users\stevenwsy\Desktop\Steven – Python>python versions.py
    scipy: 0.18.1
    numpy: 1.12.0
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.8.0
    sklearn: 0.18.1

    Though the output from deep_versions.py is consistent with those in the post for theano and tensorflow, there is warning for theano installation. Is it the reason for the failure of keras installation?

    C:\Users\stevenwsy\Desktop\Steven – Python>python deep_versions.py
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    theano: 0.8.2.dev-901275534cbfe3fbbe290ce85d1abf8bb9a5b203
    tensorflow: 1.0.1

  6. Alex March 14, 2017 at 7:27 am #

    It would be great if you add xgboost. It complete all necessary things.

  7. Thrinadh N March 14, 2017 at 5:54 pm #

    Thanks! providing the installation Guide for Python

    I successfully Installed the below Contents
    1)Download Anaconda
    2)Install Anaconda
    3)Start and Update Anaconda
    4)Update scikit-learn Library
    5)Deep Learning Libraries, .

  8. James March 15, 2017 at 3:50 am #

    On Win7 x64:

    theano: 0.8.2.dev-901275534cbfe3fbbe290ce85d1abf8bb9a5b203
    tensorflow: 1.0.0-rc2
    keras: 2.0.0

    resolved warnings with tensorflow by installing nightly build
    resolved warnings with theano by installing mingw and libpython packages

  9. Vijay March 16, 2017 at 4:39 am #

    getting following error after installing tensorflow version 1.0.0
    C:\Users\324034784>pip install keras
    Collecting keras
    Using cached Keras-2.0.0.tar.gz
    Collecting tensorflow (from keras)
    Could not find a version that satisfies the requirement tensorflow (from keras) (from versions: )
    No matching distribution found for tensorflow (from keras)

    Is this due to tensorflow version?

    • Jason Brownlee March 16, 2017 at 8:03 am #

      Consider installing Keras 1.2.2 instead that will work with tensorflow 1.0.

      Keras 2.0 requires tensorflow 1.0.1+

      For example:

  10. victor March 16, 2017 at 5:31 pm #

    theano: 0.8.2.dev-901275534cbfe3fbbe290ce85d1abf8bb9a5b203
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.0

  11. S Kotrappa March 18, 2017 at 1:34 am #

    C:\Python27\Scripts>python deep_versions.py
    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    ImportError: No module named theano

    C:\Python27\Scripts>import theano
    ‘import’ is not recognized as an internal or external command,
    operable program or batch file.

    C:\Python27\Scripts>python deep_versions.py
    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    ImportError: No module named theano

  12. S Kotrappa March 18, 2017 at 12:35 pm #

    C:\Python27\Scripts>conda create -n my_root –clone=C:\ProgramData\Anaconda2
    Source: C:\ProgramData\Anaconda2
    Destination: C:\Users\HP\AppData\Local\conda\conda\envs\my_root
    The following packages cannot be cloned out of the root environment:
    – conda-4.3.14-py27_1
    – conda-env-2.6.0-0
    Packages: 178
    Files: 1830
    #
    # To activate this environment, use:
    # > activate my_root
    #
    # To deactivate this environment, use:
    # > deactivate my_root
    #
    # * for power-users using bash, you must source
    #

    C:\Python27\Scripts>
    C:\Python27\Scripts>activate my_root

    (my_root) C:\Python27\Scripts>deep_versions.py
    Traceback (most recent call last):
    File “C:\Python27\Scripts\deep_versions.py”, line 2, in
    import theano
    ImportError: No module named theano

  13. S Kotrappa March 18, 2017 at 12:38 pm #

    C:\>python
    Python 2.7.13 |Anaconda 4.3.1 (32-bit)| (default, Dec 19 2016, 13:36:02) [MSC v.
    1500 32 bit (Intel)] on win32
    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
    >>> import theano
    WARNING (theano.configdefaults): g++ not available, if using conda: conda insta
    ll m2w64-toolchain

    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe
    cute optimized C-implementations (for both CPU and GPU) and will default to Pyth
    on implementations. Performance will be severely degraded. To remove this warnin
    g, set Theano flags cxx to an empty string.

    • Jason Brownlee March 19, 2017 at 6:07 am #

      Nice, you might be able to ignore the warnings for now.

      • S Kotrappa March 19, 2017 at 12:26 pm #

        Thank you

  14. s kotrappa March 19, 2017 at 5:40 pm #

    (py35) C:\Python27\Scripts>python deep_versions.py
    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    ImportError: No module named ‘theano’

  15. s kotrappa March 19, 2017 at 5:41 pm #

    Actually i am trying on windows 7 its always giving some problems while installing Theano & Tensorflow, Please suggest me what will be the best solution. Thank You

  16. Samradnyee Pawar March 20, 2017 at 11:58 pm #

    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

  17. Yash March 21, 2017 at 9:03 pm #

    I could not install theano as it is showing the following error.

    UnsatisfiableError: The following specifications were found to be in conflict:
    -python 3.6*
    -theano -> python 2.7*

    • Jason Brownlee March 22, 2017 at 7:56 am #

      Hi Yash, sorry to hear that. Consider installing the Python 2.7 version of Anaconda instead, or find an alternate way to install Theano on your system.

  18. Clark March 22, 2017 at 12:44 pm #

    Hello,

    I wrote a very similar article on how to install Keras and Tensorflow (CUDA and CPU) on Windows over a month ago. It also uses the Anaconda environment. It will work with Python 3.5 and I also just updated it to support Keras 2.0 as well. I use it nearly everyday for my own work, so I can confirm that it works.

    If anybody is interested, here is the link: http://discover-fx.com/set-up-your-own-keras-with-tensorflow-gpu-deep-learning-environment-on-windows-8-1-and-10/.

    Hope it helps somebody out there!

    Clark

    • Clark March 22, 2017 at 12:45 pm #

      Maybe Jason could include it under the Further Reading section?

    • Jason Brownlee March 23, 2017 at 8:44 am #

      Thanks Clark.

  19. Jefferson Sankara March 24, 2017 at 2:55 pm #

    C:\python>python versions.py
    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

    C:\python>

  20. Ram March 25, 2017 at 8:44 pm #

    In my 64 bit Windows and 3.6 Python anaconda(64bit) I am unable to install tensorflow
    In links suggested by you they say tensorflow on Windows is only supported for 3.5.x python or less
    I tried all the commands I could browse on the internet
    What should I do next?

    • Jason Brownlee March 26, 2017 at 6:12 am #

      Hi Ram, to use Kease you only need Theano OR TensorFlow. If you can install Theano, then you can use Keras.

  21. Richard Evans March 30, 2017 at 4:06 am #

    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

  22. Richard Evans March 30, 2017 at 8:27 pm #

    python ./deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.2
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    keras: 2.0.2

  23. Reinhard April 1, 2017 at 7:36 pm #

    For those who are stuck at installing Tensorflow because of the Python version (I’m on Anaconda 4.3.1 with python 3.6)
    You can create conda environment before installing theano

    C:> conda create -n tensorflow python=3.5
    C:> activate tensorflow

    Keras use tensorflow by default, but I encounter error everytime I tried to install keras before theano

    • Jason Brownlee April 2, 2017 at 6:26 am #

      Thanks for the advice Reinhard.

    • Laura May 27, 2017 at 3:09 am #

      Your comment saved my life. Thank you.

      My environment is now configured <3:

      theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
      tensorflow: 1.0.0
      Using TensorFlow backend.
      keras: 2.0.4

  24. Kotrappa April 12, 2017 at 9:03 pm #

    tensorflow:xtensor installed on windows 7 , is it ok

  25. John April 13, 2017 at 9:13 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 0.11.0
    Using TensorFlow backend.
    keras: 2.0.3

  26. Raynier van Egmond April 15, 2017 at 2:44 am #

    C:\Users\\Documents\Python Scripts\_ML>python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Using TensorFlow backend.
    keras: 2.0.3

    I used a Tensorflow wheel build for python3.6 from:

    # http://www.lfd.uci.edu/~gohlke/pythonlibs/#tensorflow
    # tensorflow‑1.0.1‑cp36‑cp36m‑win_amd64.whl

    I’ll report if this works for me or if I need to go to a 3.5 environment.

  27. PJ April 17, 2017 at 5:14 am #

    Hi Jason,
    I had an issue with installing Tensorflow in Win7 PC. During install it stated that Python 3.6 and Tensorflow 3.5 are incompatible.

    I then uninstalled everything and started fresh and left out Tensorflow. Not sure if that’s going to be an issue (your note indicated that only either keras or tensorflow are needed).

    C:\Temp>python versions.py
    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

    C:\Temp>python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    In the ‘deep_versions.py’ script I swappped the order of the ‘keras’ and ‘tensorflow’ check.

    C:\Temp>python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import keras
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\__init__.py”, line 3, i
    n
    from . import activations
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\activations.py”, line 3
    , in
    from . import backend as K
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\__init__.py”, l
    ine 73, in
    from .tensorflow_backend import *
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_back
    end.py”, line 1, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

  28. PJ April 17, 2017 at 6:17 am #

    I as able to get through your tutorial without issues even though I could not install Tensorflow

  29. Eid April 19, 2017 at 3:33 am #

    Hi Jason,

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0-rc2
    Using TensorFlow backend.
    keras: 2.0.3

    TensorFlow wasn’t easy, got to google the many errors I saw.
    i’m using Intel i5-6300 @2.4GHz and I see the deep_versions.py takes at least 5 seconds to load.. is it ok?

    Thanks,
    Eid

    • Jason Brownlee April 19, 2017 at 7:55 am #

      Well done!

      Yes, that is normal as it has to load a lot of libs into memory. Specifically Theano can be very slow to start. The second time it is run should be much faster.

  30. M Bhat April 19, 2017 at 10:05 pm #

    Whenever I type the command python deep.py (for point 5), it says
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Traceback (most recent call last):
    File “deep.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    Pls help me and reply fast!

    • Jason Brownlee April 20, 2017 at 9:25 am #

      You don’t need tensorflow and theano. Just comment out the import and check of tensorflow.

  31. Trang April 20, 2017 at 2:18 am #

    Here is mine
    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

  32. M Bha April 20, 2017 at 4:59 am #

    hi sir,
    I am getting this in my cmd.

    C:\ProgramData\Anaconda3>python deep.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Traceback (most recent call last):
    File “deep.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    Could you please help me letting know what to do?

    • Jason Brownlee April 20, 2017 at 9:33 am #

      Comment out that line if you do not have TF installed.

      • MB April 29, 2017 at 2:37 pm #

        What does that mean sir?

        • Jason Brownlee April 30, 2017 at 5:26 am #

          Comment out the line that imports tensorflow and that prints the tensorflow version if you do not have tensorflow installed.

  33. Shai April 30, 2017 at 11:35 pm #

    MacBook-Pro:AnacondaWorkspace shai$ python versioncheck.py
    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1
    theano: 0.9.0
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.4
    MacBook-Pro:AnacondaWorkspace shai$

  34. Ibrahim May 3, 2017 at 9:43 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.4

  35. Pipeface May 6, 2017 at 6:10 am #

    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

  36. Pipeface May 6, 2017 at 6:22 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.4

  37. Paul Tulloch May 8, 2017 at 5:55 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.4

  38. DanGilb May 9, 2017 at 11:07 am #

    I eventually used the last Anaconda3 version I found with python 3.5
    https://repo.continuum.io/archive/index.html
    Anaconda3-4.2.0-Windows-x86_64.exe
    After that install I followed the steps and got

    python deep_versions.py

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.4

    python versions.py

    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1
    thanks for the info!

  39. rodrigo samico May 11, 2017 at 12:09 am #

    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

  40. Vinay May 13, 2017 at 10:35 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.0.0
    Using TensorFlow backend.
    keras: 2.0.4

  41. Karmah May 20, 2017 at 2:21 am #

    why install keras using pip rather than conda ?

    • Jason Brownlee May 20, 2017 at 5:41 am #

      I found it easier.

      Were you able to easily install Keras using conda?

  42. Asif May 29, 2017 at 1:54 am #

    scipy: 0.18.1
    numpy: 1.11.3
    matplot lib : 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn : 0.18.1

  43. Tomasz May 29, 2017 at 7:39 am #

    Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
    scipy: 0.18.1
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Using Theano backend.
    keras: 2.0.4

    I found this useful to locate keras.json on Windows:
    https://stackoverflow.com/questions/40310035/how-to-change-keras-backend-wheres-the-json-file

    • Jason Brownlee June 2, 2017 at 12:17 pm #

      Very nice Tomasz!

      Thanks for the link for windows users (an area I know very little about).

  44. Hemanth Kumar K June 3, 2017 at 3:19 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 0.12.0-rc0
    Using TensorFlow backend.
    keras: 2.0.4

  45. Juan Gamboa June 6, 2017 at 12:42 am #

    Congratulations, this is an excellent post.

    My results for versions.py was:

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

    Thank you.

  46. Mahdis June 6, 2017 at 6:07 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.4

  47. Saswati June 6, 2017 at 9:13 pm #

    CondaIOError: Missing write permissions in: /home/saswati/anaconda2
    #
    # You don’t appear to have the necessary permissions to install packages
    # into the install area ‘/home/saswati/anaconda2’.
    # However you can clone this environment into your home directory and
    # then make changes to it.
    # This may be done using the command:
    #
    # $ conda create -n my_root –clone=”/home/saswati/anaconda2″

    • Jason Brownlee June 7, 2017 at 7:13 am #

      Sorry, I have not seen this error before. Perhaps post to Anaconda support or stackoverflow?

  48. Maria June 8, 2017 at 4:01 am #

    I got:

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.0-rc2
    Using TensorFlow backend.
    keras: 2.0.4

    thanks so much!!!!

  49. Saswati June 9, 2017 at 7:48 pm #

    Thank You!!!

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.2

  50. Ankit June 10, 2017 at 4:12 pm #

    theano: 0.9.0
    tensorflow: 1.2.0-rc2
    Using TensorFlow backend.
    keras: 2.0.4

    Thanks Jason!

  51. Alex Malcolm June 10, 2017 at 8:44 pm #

    Hello, I got this error when trying to use anaconda. I believe it was installed into the incorrect directory as it was installed by default into the Macintosh HD instead of the python folder.

    Traceback (most recent call last):
    File “/Users/USERNAME/Documents/machine learning/versions.py”, line 2, in
    import scipy
    ModuleNotFoundError: No module named ‘scipy’
    >>>

    • Jason Brownlee June 11, 2017 at 8:24 am #

      I’m sorry to hear that.

      Perhaps you need to re-open your terminal after anaconda was installed?

  52. Manisha Joshi June 17, 2017 at 5:17 am #

    Hi Jason,
    I am trying this program out for the first time. I love your documentation!. My program is very slow. I have followed your instructions to install Kera, tensarflow …
    I get this warning
    2017-06-16 14:35:01.271282: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
    2017-06-16 14:35:01.271304: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
    2017-06-16 14:35:01.271308: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
    2017-06-16 14:35:01.271314: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
    2017-06-16 14:35:01.271317: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

    • Jason Brownlee June 17, 2017 at 7:35 am #

      You can ignore those warnings for now unless you want to dive into compiling tensorflow from scratch on your system (not recommended).

  53. khadidjaban June 17, 2017 at 9:29 am #

    I would create a python 3.5 (anaconda3) program executable, please how to do it?

  54. daveg June 22, 2017 at 2:10 pm #

    python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.5

  55. Chris June 23, 2017 at 2:27 am #

    Hi I’m getting the following:
    python deep_version.py
    Could not find platform independent libraries
    Could not find platform dependent libraries
    Consider setting $PYTHONHOME to [:]
    Fatal Python error: Py_Initialize: Unable to get the locale encoding
    ImportError: No module named ‘encodings’

    Current thread 0x00007f60ac325700 (most recent call first):
    Aborted (core dumped)

    Do you know what is causing this? I’ve read multiple python installs but I have 2.7.12 and 3.6.2 and don’t think these two should conflict…thanks!

    • Jason Brownlee June 23, 2017 at 6:43 am #

      Sorry, I have not seen this error, consider posting to stackoverflow or contacting anaconda support?

  56. Seema June 27, 2017 at 7:48 pm #

    hii Jason !!

    I have a Windows system and python 2.7 , I installed theano and Keras ,
    and I tried to print the deep_versions.py , I edited the code and removed the lines for Tensor flow, I am getting this error

    ===============================
    Problem occurred during compilation with the command line below:
    “C:\Users\Seema Singh\Anaconda2\Library\mingw-w64\bin\g++.exe” -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I”C:\Users\Seema Singh\Anaconda2\lib\site-packages\numpy\core\include” -I”C:\Users\Seema Singh\Anaconda2\include” -I”C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\gof” -L”C:\Users\Seema Singh\Anaconda2\libs” -L”C:\Users\Seema Singh\Anaconda2″ -o C:\Users\Seema Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.13-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\Seema Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp -lpython27
    g++.exe: error: Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.13-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory
    g++.exe: error: C:\Users\Seema: No such file or directory
    g++.exe: error: Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp: No such file or directory

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\__init__.py”, line 66, in
    from theano.compile import (
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\compile\__init__.py”, line 10, in
    from theano.compile.function_module import *
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\compile\function_module.py”, line 21, in
    import theano.compile.mode
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\compile\mode.py”, line 10, in
    import theano.gof.vm
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\gof\vm.py”, line 662, in
    from . import lazylinker_c
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\gof\lazylinker_c.py”, line 127, in
    preargs=args)
    File “C:\Users\Seema Singh\Anaconda2\lib\site-packages\theano\gof\cmodule.py”, line 2316, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    Exception: Compilation failed (return status=1): g++.exe: error: Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-2.7.13-64\lazylinker_ext\lazylinker_ext.pyd: No such file or dire. g++.exe: error: Singh\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_58_Stepping_9_Genui. Intel-2.7.13-64\lazylinker_ext\mod.cpp: No such file or directory

    • Jason Brownlee June 28, 2017 at 6:22 am #

      That does not look, sorry to hear that.

      Perhaps try posting to the theano user group or stack overflow?

      • Seema June 28, 2017 at 3:46 pm #

        hii Jason!
        I have successfully installed theano but
        It seems like Keras has no been installed in my system

        theano 0.9.0 py27_0
        (C:\Users\Seema Singh\Anaconda2) C:\Users\Seema Singh>pip install keras
        Requirement already satisfied: keras in c:\users\seema singh\anaconda2\lib\site-packages
        Requirement already satisfied: pyyaml in c:\users\seema singh\anaconda2\lib\site-packages (from keras)
        Requirement already satisfied: theano in c:\users\seema singh\anaconda2\lib\site-packages (from keras)
        Requirement already satisfied: six in c:\users\seema singh\anaconda2\lib\site-packages (from keras)
        Requirement already satisfied: numpy>=1.9.1 in c:\users\seema singh\anaconda2\lib\site-packages (from theano->keras)
        Requirement already satisfied: scipy>=0.14 in c:\users\seema singh\anaconda2\lib\site-packages (from theano->keras)

  57. Tushar June 28, 2017 at 7:38 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1
    WARNING (theano.configdefaults): Only clang++ is supported. With g++, we end up with strange g++/OSX bugs.
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.5

  58. Candida June 29, 2017 at 10:49 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  59. HasnainAbbas June 30, 2017 at 4:29 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  60. Sana June 30, 2017 at 5:15 pm #

    scipy:0.19.0
    numpy:1.12.1
    pandas:0.20.1
    matplotlib:2.0.2
    statsmodels:0.8.0
    sklearn:0.18.1

    theano:0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow:1.1.0
    Using TensorFlow backend.
    keras:2.0.5

  61. Folasade July 4, 2017 at 2:18 am #

    Microsoft Windows [Version 10.0.15063]
    (c) 2017 Microsoft Corporation. All rights reserved.

    C:\Users\FOLASADE ARIYIKE>conda -V
    conda 4.3.22

    C:\Users\FOLASADE ARIYIKE>python -V
    Python 3.6.1 :: Anaconda 4.4.0 (64-bit)

    C:\Users\FOLASADE ARIYIKE>conda update anaconda
    Fetching package metadata …
    CondaHTTPError: HTTP None None for url
    Elapsed: None

    An HTTP error occurred when trying to retrieve this URL.
    HTTP errors are often intermittent, and a simple retry will get you on your way.
    ConnectTimeout(MaxRetryError(“HTTPSConnectionPool(host=’repo.continuum.io’, port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by ConnectTimeoutError(, ‘Connection to repo.continuum.io timed out. (connect timeout=9.15)’))”,),)

    C:\Users\FOLASADE ARIYIKE>conda update anaconda
    Fetching package metadata ………..
    Solving package specifications: .

    # All requested packages already installed.
    # packages in environment at C:\Users\FOLASADE ARIYIKE\Anaconda3:
    #
    anaconda 4.4.0 np112py36_0

    C:\Users\FOLASADE ARIYIKE>

  62. Teo July 6, 2017 at 11:30 pm #

    Hi, Jason

    Congratulations and thanks for your excellent pages!

    My environment is like this:

    scipy: 0.19.0
    numpy: 1.13.0
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

    and tensorflow 1.2.1 – as far as I understand it includes keras as tensorflow.keras – but I shall soon find out how things stand when I begin development 🙂

  63. tom July 7, 2017 at 1:25 pm #

    Thanks. Nice tutorial..

  64. Hayden July 8, 2017 at 8:33 am #

    Thanks! This helped me SOOO much. 🙂

  65. Joel Moore July 9, 2017 at 3:28 am #

    Finally got it after 5 hours of effort on tensorflow cpu, no module found tensorflow was the error in an anaconda command prompt, I ran “python -m pip install tensorflow” which fixed the issue in Windows 10. Also, had setup the tensorflow with python 3.5, trying to switch keras backend and configs to theanos was unsuccessful for me as well.

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.2
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  66. mani July 9, 2017 at 7:11 am #

    >>> matplotlib: 2.0.2
    >>> numpy: 1.12.1
    >>> pandas: 0.20.1
    >>> scipy: 0.19.0
    >>> sklearn: 0.18.1
    >>> statsmodels: 0.8.0

    • mani July 9, 2017 at 8:40 am #

      $ python deep_versions.py
      Using TensorFlow backend.
      keras: 2.0.6
      matplotlib: 2.0.2
      numpy: 1.12.1
      pandas: 0.20.1
      scipy: 0.19.0
      sklearn: 0.18.2
      statsmodels: 0.8.0
      tensorflow: 1.1.0
      theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291

    • Jason Brownlee July 9, 2017 at 10:57 am #

      Very nice!

  67. Jean-Christophe July 11, 2017 at 6:36 am #

    Thanks for you page.

    On my MacBook I get issues with the installation of Tensorflow:

    Any idea?
    Thanks

    WARNING (theano.configdefaults): Only clang++ is supported. With g++, we end up with strange g++/OSX bugs.
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Traceback (most recent call last):
    File “deep_versions.py”, line 4, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

  68. Jean-Christophe July 11, 2017 at 6:44 am #

    Soory I gort a step. et me retry 😉

  69. Jean-Christophe July 11, 2017 at 7:13 am #

    Same problem. Sorry

    WARNING (theano.configdefaults): Only clang++ is supported. With g++, we end up with strange g++/OSX bugs.
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Traceback (most recent call last):
    File “deep_versions.py”, line 4, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

  70. Matty July 12, 2017 at 10:27 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.6

  71. Allegra July 12, 2017 at 11:59 am #

    Hi,

    Here is my output

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  72. Gentiana Morina July 12, 2017 at 10:14 pm #

    Hello there,

    First I want to thank you for all that you’re doing for us newbies and second here is my output 🙂 :

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.2

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.6

  73. satyam saini July 13, 2017 at 6:08 am #

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\__init__.py”, line 66, in
    from theano.compile import (
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\compile\__init__.py”, line 10, in
    from theano.compile.function_module import *
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\compile\function_module.py”, line 21, in
    import theano.compile.mode
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\compile\mode.py”, line 10, in
    import theano.gof.vm
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\gof\vm.py”, line 662, in
    from . import lazylinker_c
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py”, line 127, in
    preargs=args)
    File “C:\Users\extreme gamer\Anaconda3\lib\site-packages\theano\gof\cmodule.py”, line 2316, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    Exception: Compilation failed (return status=1): g++.exe: error: gamer\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-3.6.1-64\lazylinker_ext\lazylinker_ext.pyd: No such file or d. g++.exe: error: gamer\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-SP0-Intel64_Family_6_Model_69_Stepping_1_GenuineIntel-3.6.1-64\lazylinker_ext\mod.. p: No such file or directory

    • Jason Brownlee July 13, 2017 at 10:01 am #

      Sorry to see that you are having an error. Perhaps post your question to stackoverflow?

  74. Allegra July 13, 2017 at 11:42 am #

    Hi

    More from me:

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.1.0
    Using TensorFlow backend.
    keras: 2.0.6

  75. Athenagoras July 14, 2017 at 1:31 am #

    Had trouble configuring Tensorflow on a Windows and Python 2.7 environment. Seems like you need at least Python 3.5 for Tensorflow on Windows.

    Switching the Keras Backend to Theano, however, worked fine for me. You need to alter a JSON-Init file to ‘theano’ and that’s it. The Keras.io Project Site has a nice page about switching backends with easy-to-follow instructions.

    Additional hint I learnt there:
    print(‘keras Backend: %s’ % keras.backend.backend())
    returns the Backend currently in use.

  76. Alfred O July 15, 2017 at 9:03 am #

    Good instructions and worked smmothly for me. Thanks.

  77. Shuan July 20, 2017 at 9:23 am #

    If you install Anaconda 4.4.0 which by default bundles with Python 3.6, you HAVE TO downgrade Python to v3.5 before install tensorflow. Here is what I got 🙂
    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.2
    statsmodels: 0.8.0
    sklearn: 0.18.2
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.0
    keras: 2.0.6
    keras Backend: tensorflow

    • Jason Brownlee July 21, 2017 at 9:25 am #

      Thanks for sharing Shuan. Nice work too by the way!

  78. Amira Deu July 20, 2017 at 5:51 pm #

    I got:
    conda 4.3.22
    Python 3.5.3 :: Anaconda 4.4.0 (32-bit)

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.2

    HOWEVER, I FAIL at installing tensorflow. Please HELP.

    I created a conda ‘tensorflow’ environment with python 3.5. With command
    『pip install –ignore-installed –upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl』
    I got ERROR saying
    『tensorflow-1.2.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform』

    So i changed to version 1.0.1 and same error.
    Version 1.1.0 also same error.

    So i deactivated the environment, and type command『conda install -c conda-forge tensorflow』
    I got ERROR『PackageNotFoundError: Package missing in current win-32 channels』 Instead it says the close match found is “xtensor” which i don’t know what is it.

    Is it because I’m using a 32-bit Windows 10?

    So I also tried running the following :
    『python -m pip install –upgrade tensorflow』
    and got ERROR of『Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow』

    What more requirements do i need for this?

    I tried 『pip3 install tensorflow』 but somehow it could not recognized ‘pip3’. So i type 『where pip3』 and it could not find files for the given pattern. So i type『where python』. It ouput the directory of my python. Then checked if it’s already put under the path inside the environmental variable. And it has.

    I’ve been stuck for dayssss and actually postponed my projects for months because of this. Please help it means a LOT o(╯□╰)o

    • Jason Brownlee July 21, 2017 at 9:32 am #

      Sorry, I don’t know a thing about windows. I would recommend posting to stack overflow.

      • Shaun July 22, 2017 at 1:51 pm #

        Hello Amira – As I mentioned in previous post, you HAVE TO either upgrade python to 3.5 or create py35 environment. I didn’t try to create py35 environment instead I downgraded python 3.6 to python 3.5 by simply typing “conda install python=3.5” right after Aanconda 4.4 installed. Then you just follow the procedure Jason provided. it worked perfectly. Good luck.

  79. umair July 21, 2017 at 4:17 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.2

    ************************
    deep_versions
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f129
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  80. umair July 21, 2017 at 7:57 pm #

    Thank you Mr. Jason for sharing such a useful resource.
    I just wanted to know if there is any way i can install Tensorflow GPU,because my machine has AMD (Radeon) and want to perform computation on my GPU instead of CPU.I have studied the documentation for Tensorflow which supports Nvidia Cuda only.

  81. Mac Mendoza July 23, 2017 at 12:31 am #

    Mac_mechanics python “D:\Deep Learning Folder\Initialization\versions.py”
    scipy:0.19.0
    numpy:1.12.1
    matplotlib:2.0.2
    pandas:0.20.1
    statsmodels:0.8.0
    sklearn:0.18.1

    I needed to hardcode the directory since I cannot change the directory using prompt command

  82. RonB July 24, 2017 at 1:50 pm #

    Awesome stuff Jason

  83. Nelson CW Lee July 25, 2017 at 8:06 pm #

    I installed successfully. Thanks!

    PS D:\anaconda> python versions.py
    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.18.2
    PS D:\anaconda> python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6
    PS D:\anaconda>

  84. BeneHei July 26, 2017 at 5:32 pm #

    tensorflow: 1.2.0
    Using TensorFlow backend.
    keras: 2.0.6

    TANKS VERY MUCH!

  85. Dave July 31, 2017 at 7:58 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1
    tensorflow: 1.3.0-rc1

    This was a HUGE pain to get through and I’m still not 100% sure I did it right, but I’m very much looking forward to writing some actual script. I GREATLY appreciate your direction on this!

  86. Chenin July 31, 2017 at 9:40 pm #

    >>> import theano
    >>> print(‘theano: %s’ % theano.__version__)
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    >>> import tensorflow
    >>> print(‘tensorflow: %s’ % tensorflow.__version__)
    tensorflow: 1.2.0
    >>> import keras
    Using TensorFlow backend.
    print(‘keras: %s’>>> print(‘keras: %s’ % keras.__version__)
    keras: 2.0.6
    >>>

  87. ujjawal August 1, 2017 at 11:14 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  88. paras jain August 2, 2017 at 6:25 pm #

    hi i have install everything that you have told but i don’t know how to run anaconda . i use ubuntu 16.4 lts . i need to know which command to run on the terminal to start the anaconda

    • Jason Brownlee August 3, 2017 at 6:47 am #

      Open the command line and type:

      This will open the python interpreter.

  89. Paras jain August 2, 2017 at 7:45 pm #

    i have installed everything but i don’t know how to start/run anaconda in ubuntu. i want to know the command to run anaconda in ubuntu via terminal

  90. Jonas August 3, 2017 at 11:03 am #

    Great tutorial, thanks!!!

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  91. Nuibb August 3, 2017 at 4:43 pm #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  92. Chris August 3, 2017 at 5:24 pm #

    Without using a C++ compiler my setup (see below) works well (but slow of course). I used the code example of your book “Deep Learning with Python\Develop your first neural network with Keras (page 47, capter 7.8)”.
    To speed up the runtime I installed TDM-GCC. Then an import error “DLL load failed” was shown – even after installing OpenBLAS.

    I know that I didn’t follow exactly your installation guide on this site but it seems to me there’s only a penny to success. Maybe you/someone else had the same problem and knows a solution?

    Installed software:
    – Windows 10 Home
    – Python 3.6.1 (v3.6.1:69c0db5) [MSC v.1900 64 bit (AMD64)] on win32
    – numpy (1.13.0rc2+mkl) (installed as wheel)
    – scipy (0.19.0) (installed as wheel)
    – scikit-learn (0.18.1) (installed as wheel)
    – Theano (0.9.0)
    – Keras (2.0.6)
    – gcc version 5.1.0 (tdm64-1)
    – OpenBLAS-v0.2.19-Win64-int32

    I added the following entries to the path:
    C:\Python36\
    C:\TDM-GCC-64\bin\
    C:\TDM-GCC-64\x86_64-w64-mingw32\bin\
    C:\TDM-GCC-64\x86_64-w64-mingw32\lib\
    C:\OpenBLAS-v0.2.19-Win64-int32\bin\
    C:\OpenBLAS-v0.2.19-Win64-int32\lib\

    My theaonrc.txt looks like this:
    [global]
    floatX = float32
    device = cpu
    cxx=C:\\TDM-GCC-64\\bin\\g++.exe

    [blas]
    ldflags = -LC:\\OpenBLAS-v0.2.19-Win64-int32\\bin -LC:\\OpenBLAS-v0.2.19- Win64-int32\\lib -lopenblas

    Trace log which shows the error:
    Using Theano backend.
    Traceback (most recent call last):
    File “C:/Christian/Python/DL.py”, line 15, in model.add(Dense(12, input_dim=8, activation=’relu’))
    File “C:\Python36\lib\site-packages\keras\models.py”, line 436, in add layer(x)
    File “C:\Python36\lib\site-packages\keras\engine\topology.py”, line 569, in __call__self.build(input_shapes[0])
    File “C:\Python36\lib\site-packages\keras\layers\core.py”, line 825, in build constraint=self.kernel_constraint)
    File “C:\Python36\lib\site-packages\keras\legacy\interfaces.py”, line 87, in wrapper return func(*args, **kwargs)
    File “C:\Python36\lib\site-packages\keras\engine\topology.py”, line 391, in add_weight weight = K.variable(initializer(shape), dtype=dtype, name=name)
    File “C:\Python36\lib\site-packages\keras\initializers.py”, line 208, in __call__dtype=dtype, seed=self.seed)
    File “C:\Python36\lib\site-packages\keras\backend\theano_backend.py”, line 2191, in random_uniform return rng.uniform(shape, low=minval, high=maxval, dtype=dtype)
    File “C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py”, line 1354, in uniform rstates = self.get_substream_rstates(nstreams, dtype)
    File “C:\Python36\lib\site-packages\theano\configparser.py”, line 117, in res return f(*args, **kwargs)
    File “C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py”, line 1256, in get_substream_rstates multMatVect(rval[0], A1p72, M1, A2p72, M2)
    File “C:\Python36\lib\site-packages\theano\sandbox\rng_mrg.py”, line 66, in multMatVect[A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym], o, profile=False)
    File “C:\Python36\lib\site-packages\theano\compile\function.py”, line 326, in function output_keys=output_keys)
    File “C:\Python36\lib\site-packages\theano\compile\pfunc.py”, line 486, in pfunc output_keys=output_keys)
    File “C:\Python36\lib\site-packages\theano\compile\function_module.py”, line 1795, in orig_function defaults)
    File “C:\Python36\lib\site-packages\theano\compile\function_module.py”, line 1661, in create input_storage=input_storage_lists, storage_map=storage_map)
    File “C:\Python36\lib\site-packages\theano\gof\link.py”, line 699, in make_thunk storage_map=storage_map)[:3]
    File “C:\Python36\lib\site-packages\theano\gof\vm.py”, line 1047, in make_all impl=impl))
    File “C:\Python36\lib\site-packages\theano\gof\op.py”, line 935, in make_thunk no_recycling)
    File “C:\Python36\lib\site-packages\theano\gof\op.py”, line 839, in make_c_thunk output_storage=node_output_storage)
    File “C:\Python36\lib\site-packages\theano\gof\cc.py”, line 1190, in make_thunk keep_lock=keep_lock)
    File “C:\Python36\lib\site-packages\theano\gof\cc.py”, line 1131, in __compile__keep_lock=keep_lock)
    File “C:\Python36\lib\site-packages\theano\gof\cc.py”, line 1586, in cthunk_factory key=key, lnk=self, keep_lock=keep_lock)
    File “C:\Python36\lib\site-packages\theano\gof\cmodule.py”, line 1159, in module_from_key module = lnk.compile_cmodule(location)
    File “C:\Python36\lib\site-packages\theano\gof\cc.py”, line 1489, in compile_cmodule preargs=preargs)
    File “C:\Python36\lib\site-packages\theano\gof\cmodule.py”, line 2325, in compile_str return dlimport(lib_filename)
    File “C:\Python36\lib\site-packages\theano\gof\cmodule.py”, line 302, in dlimport rval = __import__(module_name, {}, {}, [module_name])
    ImportError: DLL load failed: Eine DLL-Initialisierungsroutine ist fehlgeschlagen.

    • Jason Brownlee August 4, 2017 at 6:49 am #

      Sorry, I don’t have any good ideas.

      Consider posting to stack overflow?

      • Chris August 5, 2017 at 10:22 pm #

        Thank you anyway.
        I posted my question to stack overflow before asking here (but didn’t get any answer so far).

        • Jason Brownlee August 6, 2017 at 7:38 am #

          Sorry Chriss, I am not an expert at debugging workstations.

          Perhaps it might be worth contacting the Anaconda people?

          • Chris August 6, 2017 at 8:06 pm #

            I gave up, uninstalled my setup and installed Anaconda – now it works 🙂

            scipy: 0.19.1
            numpy: 1.13.1
            matplotlib: 2.0.2
            pandas: 0.20.3
            statsmodels: 0.8.0
            sklearn: 0.18.2
            theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
            keras: 2.0.6

          • Jason Brownlee August 7, 2017 at 8:41 am #

            Nice work Chris!

  93. Shay August 6, 2017 at 11:31 pm #

    Fabulously simple and cool, just as the rest of this site.
    Please note that Keras is now available with CNTK backend as well.

    https://docs.microsoft.com/en-us/cognitive-toolkit/Using-CNTK-with-Keras

    A good option for Windows users here.

  94. Chiedu August 10, 2017 at 2:42 am #

    Nice tutorial, I install on windows using Anaconda.
    printed out using the notebook and results were:

    import keras
    print(‘keras: %s’ % keras.__version__)
    WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
    WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
    theano: 0.9.0

    import tensorflow
    print(‘tensorflow: %s’ % tensorflow.__version__)
    tensorflow: 1.2.1

    import keras
    print(‘keras: %s’ % keras.__version__)
    Using TensorFlow backend.
    keras: 2.0.6

    How critical is the warning for theano as my GPU is an AMD Radeon(not NVDIA)

  95. Dawit August 10, 2017 at 6:32 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using Theano backend.
    keras: 2.0.2

  96. Dawit August 10, 2017 at 6:36 pm #

    hi profecer I have installed anaconda with the appropriate libreries but my backend is theano but when am writing a sample code of python it displays an error message
    Traceback (most recent call last):
    File “C:/Users/dave/PycharmProjects/AccuracyPlot/AccuracyLossPlot.py”, line 2, in
    from keras.models import Sequential
    ImportError: No module named keras.models
    so what can I do Sir? I need your help

    • Jason Brownlee August 11, 2017 at 6:40 am #

      Try running code from the command line, perhaps your IDE or notebook is causing faults (they often do!)

  97. Mayank August 16, 2017 at 4:01 am #

    Thanks a lot Jason for this very useful article. I am a windows user and I had installed theano tensorflow and keras incorrectly which corrupted my numpy as well. Consequently, I had to reinstall anaconda and using this article I was able to set up the required packages perfectly.
    As you correctly pointed out, Keras can now be run using either theano or tensorflow ( and window users may want to avoid tensorflow). However, keras uses tensorflow by default to run and this needs to be changed if the user has only installed theano and keras. This can be done by updating the ‘backend’ field from tensorflow to theano in the keras.json file which can be found in the user/.keras path.

    • Mayank August 16, 2017 at 4:04 am #

      below is the code I used to update the keras.json file using python.

      import json
      with open(‘keras.json’, ‘r’) as f:
      json_data = json.load(f)
      json_data[‘backend’] = “theano”

      with open(‘keras.json’, ‘w’) as f:
      f.write(json.dumps(json_data))

    • Jason Brownlee August 16, 2017 at 6:39 am #

      Well done Mayank!

      Thanks for the tip.

  98. Yeman August 16, 2017 at 6:15 pm #

    Dear Jason,

    your articles are best!!

    Is there any flag in keras that is used to force keras to use either GPU or CPU

    • Jason Brownlee August 17, 2017 at 6:38 am #

      No. Use of CPU/GPU is configured in the underlying math library (theano or tensorflo).

  99. Adarsh V C August 18, 2017 at 12:17 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    sklearn: 0.18.1
    statsmodels: 0.8.0

  100. Adrian August 18, 2017 at 7:00 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

    theano: 0.9.0
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  101. Adi August 20, 2017 at 5:57 am #

    Thanks for the guide Jason. My output is:

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.6

  102. Geoff Lewen August 22, 2017 at 11:00 am #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  103. Geoff Lewen August 22, 2017 at 12:40 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.7

  104. Roza August 22, 2017 at 5:06 pm #

    Dr. Brownlee,

    Thank you so much, can’t express how appreciated I am for this post. Problem solved, everything is installed and seems running perfectly.

    theano: 0.9.0
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.7

  105. Emil August 23, 2017 at 11:14 am #

    Hello Doctor,

    Here is my output:

    scipy: 0.19.0
    numpy: 1.11.3
    matplotlib: 2.0.0
    pandas: 0.19.2
    statsmodels: 0.6.1
    sklearn: 0.18.1

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.7

    Thank you for tutorial, very concise and handy!

  106. Cesar August 24, 2017 at 6:53 am #

    Ready Dr. Jason 🙂

    C:\Users\realnica\Anaconda3>python deepversion.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.7

  107. rajat bansal August 29, 2017 at 7:06 pm #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

    theano: 0.9.0
    tensorflow: 1.2.1
    keras: 2.0.8

  108. Agrippa September 5, 2017 at 4:38 am #

    Quick question, I already have Python 3.6 running on my windows machine. Does installing Anaconda3 install a second version of python? It sure looks like it from the directory.

  109. Tyson September 6, 2017 at 1:03 pm #

    C:\Users\Icarus\Documents\Anaconda>python versions.py
    Traceback (most recent call last):
    File “versions.py”, line 2, in
    import scipy
    ImportError: No module named scipy

    BUT WHEN I TYPE

    C:\Users\Icarus\Documents\Anaconda>pip install scipy
    Requirement already satisfied: scipy is c:\users\icarus\anaconda2\lib\site-packages

    I’m confused, has anyone else seen this?

  110. Garima Shrivastava September 7, 2017 at 1:57 pm #

    Hi Jason
    Thanks for the nice work.
    I hv installes spyder 2.7.1 on my windows 10. and successfully installed theano and keras and I am able to run the script with theano version 0.9.0 but not able to run the script with keras after running the script i got this error.
    runfile(‘C:/Users/Folio13 2000/Documents/Garima_files/Microsoft_datascience/06Video_Tutorial_Data_Science_Essential/Mod4/check2.py’, wdir=’C:/Users/Folio13 2000/Documents/Garima_files/Microsoft_datascience/06Video_Tutorial_Data_Science_Essential/Mod4′)
    sklearn: 0.18.1
    scipy: 0.18.1
    theano: 0.9.0
    Traceback (most recent call last):

    File “”, line 1, in
    runfile(‘C:/Users/Folio13 2000/Documents/Garima_files/Microsoft_datascience/06Video_Tutorial_Data_Science_Essential/Mod4/check2.py’, wdir=’C:/Users/Folio13 2000/Documents/Garima_files/Microsoft_datascience/06Video_Tutorial_Data_Science_Essential/Mod4′)

    File “C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py”, line 866, in runfile
    execfile(filename, namespace)

    File “C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py”, line 87, in execfile
    exec(compile(scripttext, filename, ‘exec’), glob, loc)

    File “C:/Users/Folio13 2000/Documents/Garima_files/Microsoft_datascience/06Video_Tutorial_Data_Science_Essential/Mod4/check2.py”, line 18, in
    import keras

    File “C:\ProgramData\Anaconda2\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils

    File “C:\ProgramData\Anaconda2\lib\site-packages\keras\utils\__init__.py”, line 2, in
    from . import np_utils

    ImportError: cannot import name np_utils

    can u plz suggest?

    • Jason Brownlee September 9, 2017 at 11:37 am #

      It looks like numpy might not be installed, or not installed correctly?

  111. dongngng September 8, 2017 at 4:19 pm #

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.19.0

  112. darwined September 8, 2017 at 4:46 pm #

    —————-
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Traceback (most recent call last):
    File “deep_versions.py”, line 9, in
    print(‘keras: %s’ % keras.__version__)
    AttributeError: module ‘keras’ has no attribute ‘__version__’

    —————-
    Is it alright?
    Though keras is imported, it throws out an error while displaying its version.

    • Jason Brownlee September 9, 2017 at 11:52 am #

      It looks like keras might not be installed or not installed correctly

      Try reinstalling?
      Try rebooting?

  113. Nima September 14, 2017 at 6:32 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.8

  114. Vivek September 15, 2017 at 11:55 pm #

    Thank you so much for this detailed help

  115. Vlad September 16, 2017 at 7:13 pm #

    😀

    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.18.1

  116. Vlad September 16, 2017 at 7:23 pm #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.8

    WOOOHOOO

  117. Marco Encina September 21, 2017 at 3:39 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.8

    =) I am trying to use NNs to identify dynamical systems. I hope the blog could be useful for me. I am trying to follow the contents but I also would like to have an overview about NNs, could you give me some advice ? Thanks in advance 😉

  118. Cristián Irribarra September 26, 2017 at 1:33 pm #

    I’ve got a traceback just for doing the imports.
    when trying to import keras, python returns.

    “cannot import name utils”

    • Jason Brownlee September 26, 2017 at 3:01 pm #

      That is odd. Perhaps confirm that you have everything installed.

    • Cristián Irribarra September 26, 2017 at 4:03 pm #

      nvm, I just installed everything in a conda virtual enviroment and worked smooth!

Leave a Reply