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.

126 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

  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?

Leave a Reply