How to Setup Your Python Environment for Machine Learning with Anaconda

Last Updated on September 17, 2020

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.

Kick-start your project with my new book Machine Learning Mastery With Python, including step-by-step tutorials and the Python source code files for all examples.

Let’s get started.

  • Update Mar/2017: Added note that you only need one of Theano or TensorFlow to use Keras 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.

Discover Fast Machine Learning in Python!

Master Machine Learning With Python

Develop Your Own Models in Minutes

...with just a few lines of scikit-learn code

Learn 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.

See What's Inside

1,505 Responses to How to Setup Your Python Environment for Machine Learning with Anaconda

  1. Avatar
    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

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

      Very nice!

      • Avatar
        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

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

          Very nice work Nitin.

          • Avatar
            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

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

            Nice work Shirley.

        • Avatar
          Swetha May 19, 2020 at 1:04 pm #

          How can I install wordcloud and gensim in python 3.7

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

        i saw this “syntax invalid syntax

      • Avatar
        Saad ismail November 9, 2017 at 8:36 pm #

        sir Jason im very new about machne learning please guide me how cani started thank you!

        • Avatar
          Jason Brownlee November 10, 2017 at 10:32 am #

          My best advice for getting stared is right here:
          https://machinelearningmastery.mystagingwebsite.com/start-here/#getstarted

          • Avatar
            Litta November 30, 2017 at 6:31 pm #

            I got the following warning when I tried to see deep versions

            python deep_versions.py
            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.3.0
            Using TensorFlow backend.
            keras: 2.1.1

          • Avatar
            Jason Brownlee December 1, 2017 at 7:27 am #

            Perhaps ignore these warnings and focus on using the tensorflow backend?

          • Avatar
            Muneeb Alam Khan May 27, 2018 at 6:16 pm #

            Dear sir,
            I want to implement the deep learning for the wireless communication dataset that I have. I want to train it and predict the results. Please advise.

          • Avatar
            Jason Brownlee May 28, 2018 at 5:57 am #

            I recommend this process to work through your problem systematically:
            https://machinelearningmastery.mystagingwebsite.com/start-here/#process

      • Avatar
        Sindhu October 11, 2018 at 12:50 am #

        scipy: 1.1.0
        numpy: 1.15.2
        matplotlib: 3.0.0
        pandas: 0.23.4
        statsmodels: 0.9.0
        sklearn: 0.20.0

      • Avatar
        haj June 1, 2022 at 5:42 pm #

        I m using windows and I installed both theano and TensorFlow on my PC would that cause any problem?

        • Avatar
          Adrian Tam June 1, 2022 at 11:21 pm #

          No, it should not. But Theano stopped development and phased out by Keras. Rather than strictly following the guide here (which was written a few years ago), try to install the latest version of Tensorflow only. Everything else should be just fine.

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

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

    • Avatar
      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

    • Avatar
      Abbas April 24, 2018 at 10:39 am #

      Hello Jason,

      I am getting a couple of warnings:

      theano: 1.0.1
      tensorflow: 1.0.0
      Using TensorFlow backend.
      keras: 2.1.5

      Thank you

    • Avatar
      mmm June 15, 2018 at 3:09 am #

      tensorflow: 1.1.0
      /anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
      from ._conv import register_converters as _register_converters
      Using TensorFlow backend.
      keras: 2.2.0

    • Avatar
      Jeff August 8, 2018 at 10:32 am #

      /usr/bin/python3.5 /home/jeff/pythonPrograms/versions.py
      scipy: 0.17.0
      numpy: 1.13.1
      matplotlib: 1.5.1
      pandas: 0.20.3
      sklearn: 0.19.0

      Process finished with exit code 0 after commenting statsmodel.

      scipy: 0.17.0
      numpy: 1.13.1
      matplotlib: 1.5.1
      Traceback (most recent call last):
      File “/home/jeff/pythonPrograms/versions.py”, line 15, in
      import statsmodels
      ImportError: No module named ‘statsmodels’
      pandas: 0.20.3

      Process finished with exit code 1

      • Avatar
        Jason Brownlee August 8, 2018 at 2:15 pm #

        Thanks Jeff, perhaps statsmodels was removed from a recent release of Anaconda?

        You can install it via the conda command or via pip.

      • Avatar
        Manthan Bari February 21, 2020 at 3:21 pm #

        I think after downloading the statsmodels library, you just have to run the command ‘conda activate base’ from any directory so as to run your versions.py file in your Anaconda environment. And then move to the directory where your versions.py is present and then run that file. This worked for me.

    • Avatar
      Jeff August 8, 2018 at 10:55 am #

      /usr/bin/python3.5 /home/jeff/PycharmProjects/deepversion_py/deep_versions.py
      Traceback (most recent call last):
      File “/home/jeff/PycharmProjects/deepversion_py/deep_versions.py”, line 8, in
      import keras
      ImportError: No module named ‘keras’

      Process finished with exit code 1

      got this message with each of 3 imports

      • Avatar
        Jason Brownlee August 8, 2018 at 2:16 pm #

        Perhaps your system has more than one version of Python installed? I have seen this many times with readers on Linux or Mac.

      • Avatar
        Matan Gelber August 17, 2018 at 12:24 pm #

        did you solved it? i have the same problem

    • Avatar
      Sindhu October 11, 2018 at 1:38 am #

      theano: 1.0.3
      tensorflow: 1.11.0
      Using TensorFlow backend.
      keras: 2.2.4

    • Avatar
      Tariq April 10, 2019 at 10:58 pm #

      (base) ???? Machine-Learning-Mastery $ python versions.py
      scipy: 1.2.1
      numpy: 1.16.2
      matplotlib: 3.0.3
      pandas: 0.24.2
      statsmodels: 0.9.0
      sklearn: 0.20.3

      (base) ???? Machine-Learning-Mastery $ python deep_versions.py
      theano: 1.0.3
      tensorflow: 1.13.1
      Using TensorFlow backend.
      keras: 2.2.4

    • Avatar
      Drew Wiskus August 2, 2019 at 4:39 am #

      WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
      theano: 1.0.3
      //anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module ‘tensorflow.python.framework.fast_tensor_util’ does not match runtime version 3.7
      return f(*args, **kwds)
      tensorflow: 1.13.1
      Using TensorFlow backend.
      keras: 2.2.4

      Anything to worry about Jason?

      Thanks for initiating my journey btw 🙂 started learning a couple weeks ago and almost gave up if it wasn’t for finding your articles yesterday

      • Avatar
        Jason Brownlee August 2, 2019 at 6:56 am #

        Nice work. You can ignore the warning for now perhaps.

    • Avatar
      Adam November 10, 2019 at 5:32 am #

      done…now i can start working through machine learning mastery with python ebook!

      theano: 1.0.4
      tensorflow: 2.0.0
      Using TensorFlow backend.
      keras: 2.3.1

    • Avatar
      Kerdawg March 10, 2020 at 5:42 am #

      Ready to rock and roll!

      (base) C:\Users\ld3814>python versions.py
      scipy: 1.4.1
      numpy: 1.18.1
      matplotlib: 3.1.3
      pandas: 1.0.1
      statsmodels: 0.11.0
      sklearn: 0.22.1

      (base) C:\Users\ld3814>python deep_versions.py
      theano: 1.0.4
      tensorflow: 2.1.0
      Using TensorFlow backend.
      keras: 2.3.1

      • Avatar
        Jason Brownlee March 10, 2020 at 5:43 am #

        Well done!

      • Avatar
        Rhoda April 6, 2020 at 11:39 am #

        scipy: 1.4.1
        numpy: 1.16.4
        matplotlib: 3.1.3
        pandas: 1.0.3
        statsmodels: 0.11.0
        sklearn: 0.22.1

        Hello dear, do you know why my numpy version is lower than you? I just updatd it.

    • Avatar
      John Caro September 11, 2020 at 10:50 pm #

      I got: scipy: 1.5.0
      numpy: 1.19.1
      matplotlib: 3.3.1
      pandas: 1.1.1
      statsmodels: 0.11.1
      sklearn: 0.23.2

      thanks for keeping this simple

    • Avatar
      Jillian Annyce Bibbins May 14, 2021 at 6:33 am #

      scipy: 1.5.2
      numpy: 1.19.2
      matplotlib: 3.3.2
      pandas: 1.1.3
      statsmodels: 0.12.0
      sklearn: 0.23.2

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

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

    Thx

    • Avatar
      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?

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

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

      Thx

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

        Glad to hear it Nico.

        • Avatar
          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

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

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

  3. Avatar
    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.

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

      Same

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

        Consider using Keras with Theano, everything will work perfectly.

    • Avatar
      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.

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

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

  4. Avatar
    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’

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

      Sorry Steven, I have not seen this error.

    • Avatar
      Kamil October 25, 2017 at 9:03 pm #

      try:
      conda install –force html5lib
      and then
      pip install keras

  5. Avatar
    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. Avatar
    Alex March 14, 2017 at 7:27 am #

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

  7. Avatar
    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. Avatar
    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

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

      Very nice work!

      • Avatar
        Paul December 18, 2019 at 11:22 pm #

        Please do I need internet connection to set up virtual environment?

        • Avatar
          Jason Brownlee December 19, 2019 at 6:31 am #

          I don’t have tutorials on setting up a virtual environment. Perhaps post your question to stackoverflow.

    • Avatar
      Azza October 21, 2017 at 4:49 am #

      How to install tensorflow on windows??

  9. Avatar
    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?

    • Avatar
      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:

      • Avatar
        Aron November 22, 2017 at 4:43 pm #

        Hi, Jason, I have successfully installed theano and keras, but when I ran my code in spyder, I met with the problem ” the kernel died and restarting” repeatedly, I’d appreciate it if you can help me with this.

        • Avatar
          Jason Brownlee November 23, 2017 at 10:28 am #

          Perhaps try running from the command line. Editors and notebooks often cause or hide errors.

  10. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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.

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

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

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

        Thank you

  14. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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*

    • Avatar
      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. Avatar
    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

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

      Maybe Jason could include it under the Further Reading section?

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

      Thanks Clark.

  19. Avatar
    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. Avatar
    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?

    • Avatar
      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. Avatar
    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. Avatar
    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. Avatar
    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

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

      Thanks for the advice Reinhard.

    • Avatar
      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. Avatar
    Kotrappa April 12, 2017 at 9:03 pm #

    tensorflow:xtensor installed on windows 7 , is it ok

  25. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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

    • Avatar
      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. Avatar
    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!

    • Avatar
      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. Avatar
    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. Avatar
    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?

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

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

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

        What does that mean sir?

        • Avatar
          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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    Karmah May 20, 2017 at 2:21 am #

    why install keras using pip rather than conda ?

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

      I found it easier.

      Were you able to easily install Keras using conda?

  42. Avatar
    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

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

      Very nice Asif!

      • Avatar
        zaheer November 15, 2018 at 3:39 am #

        def load doc_(“Filename”):
        sir i don’t understand which file name i use?

  43. Avatar
    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

    • Avatar
      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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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″

    • Avatar
      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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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’
    >>>

    • Avatar
      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. Avatar
    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.

    • Avatar
      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. Avatar
    khadidjaban June 17, 2017 at 9:29 am #

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

  54. Avatar
    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. Avatar
    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!

    • Avatar
      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. Avatar
    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

    • Avatar
      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?

      • Avatar
        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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    tom July 7, 2017 at 1:25 pm #

    Thanks. Nice tutorial..

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

    Thanks! This helped me SOOO much. 🙂

  65. Avatar
    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. Avatar
    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

    • Avatar
      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

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

      Very nice!

  67. Avatar
    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. Avatar
    Jean-Christophe July 11, 2017 at 6:44 am #

    Soory I gort a step. et me retry 😉

  69. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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

    • Avatar
      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. Avatar
    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. Avatar
    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. Avatar
    Alfred O July 15, 2017 at 9:03 am #

    Good instructions and worked smmothly for me. Thanks.

  77. Avatar
    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

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

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

  78. Avatar
    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

    • Avatar
      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.

      • Avatar
        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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    RonB July 24, 2017 at 1:50 pm #

    Awesome stuff Jason

  83. Avatar
    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. Avatar
    BeneHei July 26, 2017 at 5:32 pm #

    tensorflow: 1.2.0
    Using TensorFlow backend.
    keras: 2.0.6

    TANKS VERY MUCH!

  85. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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

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

      Open the command line and type:

      This will open the python interpreter.

  89. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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.

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

      Sorry, I don’t have any good ideas.

      Consider posting to stack overflow?

      • Avatar
        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).

        • Avatar
          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?

          • Avatar
            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

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

            Nice work Chris!

  93. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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

    • Avatar
      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. Avatar
    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.

    • Avatar
      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))

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

      Well done Mayank!

      Thanks for the tip.

  98. Avatar
    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

    • Avatar
      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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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?

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

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

  111. Avatar
    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. Avatar
    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.

    • Avatar
      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. Avatar
    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. Avatar
    Vivek September 15, 2017 at 11:55 pm #

    Thank you so much for this detailed help

  115. Avatar
    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. Avatar
    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. Avatar
    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. Avatar
    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”

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

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

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

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

  119. Avatar
    Ingrid September 27, 2017 at 2:33 am #

    These are the results from my Windows 10 machine:
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.8

    And these are from my Linux machine:
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.2

    Any idea why keras would only go to 2.0.2 in Linux?

    • Avatar
      Jason Brownlee September 27, 2017 at 5:44 am #

      Great work.

      Not sure, perhaps try upgrading keras?

  120. Avatar
    Arelis September 27, 2017 at 12:23 pm #

    Hello Jason:
    Actually I’m installing software and my output is:
    scipy: 0.19.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.19.0

  121. Avatar
    bejoscha September 29, 2017 at 2:07 am #

    Thank for your tutorials!

    Win7 64bit. Installing Anaconda & Tensorflow ok

    scipy: 0.19.1
    numpy: 1.13.2
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

    But then trying to “pip install keras” gives the following errors:

    Collecting keras
    Exception:
    Traceback (most recent call last):
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\basecommand.py”, line 215, in main
    status = self.run(options, args)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\commands\install.py”, line 335, in run
    wb.build(autobuilding=True)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\wheel.py”, line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\req\req_set.py”, line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\req\req_set.py”, line 554, in _prepare_file
    require_hashes
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\req\req_install.py”, line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 568, in _get_pages
    page = self._get_page(location)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 811, in get_page
    inst = cls(resp.content, resp.url, resp.headers)
    File “C:\PYTHON\Anaconda\lib\site-packages\pip\index.py”, line 731, in __init__
    namespaceHTMLElements=False,
    TypeError: parse() got an unexpected keyword argument ‘transport_encoding’

    • Avatar
      bejoscha September 29, 2017 at 2:14 am #

      Instead I followed the “alternative” route of installing keras as by it´s documentation:

      – Used GIT to clone the repository: git clone https://github.com/fchollet/keras.git
      – Run from the local directory: python setup.py install

      The versions script (without theano) then gives:

      tensorflow: 1.3.0
      Using TensorFlow backend.
      keras: 2.0.8

      • Avatar
        Jason Brownlee September 29, 2017 at 5:09 am #

        Great work, well done!

      • Avatar
        Xxeleton October 21, 2017 at 11:40 pm #

        I was able to get rid of it by “conda install -c conda-forge keras” and that’s it.

        • Avatar
          Hopes November 5, 2017 at 2:44 am #

          Thank you it worked

  122. Avatar
    Nathan October 2, 2017 at 10:59 am #

    theano: 0.9.0
    tensorflow: 1.3.0
    Using Theano backend.
    keras: 2.0.6

  123. Avatar
    Jonathan October 7, 2017 at 10:24 am #

    Some tips for Windows users:

    1) Installing Anaconda with all of the default settings doesn’t add conda to the Windows path, so it isn’t recognized as a command in the Windows command window. You might see a ” ‘conda’ is not recognized as an internal or external command” error.

    I worked around this by using the Anaconda Prompt, which seems to set up the environment properly.

    A potential revision of the text would be

    […] 1. Open a terminal (command line window).
    a. Windows users may want to go to the Start menu and use the “Anaconda Prompt”. […]

    Checking the box to add Anaconda to the PATH during installation will probably also work, but I haven’t tried it myself.

    2) TensorFlow is hard to install on Windows, but if you try skipping it, you can’t import Keras because it tries to use TensorFlow by default. You can get around this by changing the default Keras backend:

    Suggested text revision:

    […] Save the script to a file deep_versions.py.

    If you’re on Windows and skipped installing TensorFlow, you’ll want to change Keras’s default backend. Open C:\Users\\.keras\keras.json in a text editor and change the entry for “backend” from “tensorflow” to “therano”.

    Run the script by typing: […]

    • Avatar
      Jason Brownlee October 8, 2017 at 8:27 am #

      Thanks Jonathan, I really appreciate the tips!

      I hope that they help other Windows users.

  124. Avatar
    Arelis October 9, 2017 at 1:36 pm #

    Hello Jason:

    I had a lot a trouble with my PC, but I could do it. This is my results:

    arelis@Arelis:~/anaconda2$ python deep_versions.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.8
    arelis@Arelis:~/anaconda2$

  125. Avatar
    Vladimir October 10, 2017 at 3:40 am #

    scipy: 0.18.1
    numpy: 1.13.3
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.6.1
    sklearn: 0.19.0

  126. Avatar
    Quang October 10, 2017 at 1:34 pm #

    Thanks a lot for great tutorial, Jason !
    I went smoothly without any minor issue.

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

  127. Avatar
    Peter Buchmann October 12, 2017 at 1:48 am #

    Thank you so much for a great tutorial!

    I got the following versions installed:
    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

  128. Avatar
    Peter Buchmann October 12, 2017 at 1:58 am #

    Everything went smooth:

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

  129. Avatar
    Jose October 15, 2017 at 3:51 am #

    F:\Python_Learning>python CheckVer.py
    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.0.6

  130. Avatar
    Patrick October 18, 2017 at 1:08 am #

    Hi Jason,

    Great post. I spent hours trying to get nvidia and an endless list of useless prerequisites…
    When I got here, it took me 2 minutes.

    So, thank you!

  131. Avatar
    Abhishek Trivedi October 18, 2017 at 5:12 pm #

    Awesome article . Yes Anaconda is one solution for all machine learning tasks .

  132. Avatar
    MD ASRAFUL KABIR October 18, 2017 at 10:43 pm #

    scipy 0.19.1
    numpy 1.13.1
    matplotlib 2.0.2
    pandas 0.20.3
    statsmodels 0.8.0
    sklearn 0.19.0

  133. Avatar
    Azza October 21, 2017 at 5:06 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Using Theano backend.
    keras: 2.0.8

  134. Avatar
    Azza October 21, 2017 at 5:09 am #

    Thank you,, very nice tutorial..

  135. Avatar
    Jack_Y October 21, 2017 at 2:41 pm #

    Hi Jason, I saw warnings, do you know what is the problem?
    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.3.0
    Using TensorFlow backend.
    keras: 2.0.8
    Thanks!

  136. Avatar
    Daniel Bermudez October 24, 2017 at 9:06 am #

    This is my output:

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

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

    Thank you for the tutorial.

  137. Avatar
    Robert Johnston October 25, 2017 at 12:00 am #

    ?>python versions.py
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  138. Avatar
    Robert Johnston October 25, 2017 at 12:11 am #

    ?>python lib_version.py
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.2.1
    Using TensorFlow backend.
    keras: 2.0.8

  139. Avatar
    Laique Merlin Djeutchouang October 31, 2017 at 8:22 pm #

    Many thanks for everything Jason. You are making my journey in learning ML techniques. The following is what I got:

    scipy: 0.19.1
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

    Deep Learning Libraries:

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

  140. Avatar
    Vladimir November 3, 2017 at 10:14 pm #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

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

  141. Avatar
    Hopes November 5, 2017 at 2:42 am #

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

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

  142. Avatar
    Hopes November 5, 2017 at 2:43 am #

    And thank you very much for the great helpful posts!

  143. Avatar
    Sakina November 7, 2017 at 5:12 pm #

    I got the following output

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1
    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    Using Theano backend.
    keras: 2.0.9

  144. Avatar
    Sakina November 7, 2017 at 5:13 pm #

    Thanks a lot jason!

  145. Avatar
    Amitabh Roy November 7, 2017 at 5:17 pm #

    Thanks Jason for such an awesome post!
    I have installed the tools successfully but while importing keras, it is searching for tensorflow. i had installed only theano.
    The error stacktrace is :
    —-
    import keras
    File “C:\Users\…\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils
    File “C:\Users\…\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils
    File “C:\Users\…\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 3, in
    from .. import backend as K
    File “C:\Users\…\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\backend\__init__.py”, line 83, in
    from .tensorflow_backend import *
    File “C:\Users\…\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py”, line 1, in
    import tensorflow as tf
    —-
    #scipy: 0.19.1
    #numpy: 1.13.3
    #matplotlib: 2.1.0
    #pandas: 0.20.3
    #statsmodels: 0.8.0
    #sklearn: 0.19.1
    #theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    #Using TensorFlow backend.

    • Avatar
      Jason Brownlee November 8, 2017 at 9:19 am #

      You might need to reconfigure Keras to use Theano instead of the default TensorFlow. See the config file in ~/.keras/keras.json.

  146. Avatar
    Quijano November 15, 2017 at 8:03 am #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

    • Avatar
      Quijano November 15, 2017 at 8:11 am #

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

    • Avatar
      Jason Brownlee November 15, 2017 at 9:59 am #

      Well done!

  147. Avatar
    Ankush Manocha November 15, 2017 at 6:46 pm #

    theano: 0.9.0
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.1.1

  148. Avatar
    Gia Nguyen November 16, 2017 at 7:53 am #

    Hi Dr. Jason
    I met an issue while installing theano. Please look at the code below.
    What should I do?

    C:\ProgramData\Anaconda3) C:\Users\Pankaj Lab>conda install theano
    Fetching package metadata ………….
    Solving package specifications: .

    Package plan for installation in environment C:\ProgramData\Anaconda3:

    The following NEW packages will be INSTALLED:

    libgpuarray: 0.6.9-vc14_0
    libpython: 2.0-py36_0
    m2w64-binutils: 2.25.1-5
    m2w64-bzip2: 1.0.6-6
    m2w64-crt-git: 5.0.0.4636.2595836-2
    m2w64-gcc: 5.3.0-6
    m2w64-gcc-ada: 5.3.0-6
    m2w64-gcc-fortran: 5.3.0-6
    m2w64-gcc-libgfortran: 5.3.0-6
    m2w64-gcc-libs: 5.3.0-7
    m2w64-gcc-libs-core: 5.3.0-7
    m2w64-gcc-objc: 5.3.0-6
    m2w64-gmp: 6.1.0-2
    m2w64-headers-git: 5.0.0.4636.c0ad18a-2
    m2w64-isl: 0.16.1-2
    m2w64-libiconv: 1.14-6
    m2w64-libmangle-git: 5.0.0.4509.2e5a9a2-2
    m2w64-libwinpthread-git: 5.0.0.4634.697f757-2
    m2w64-make: 4.1.2351.a80a8b8-2
    m2w64-mpc: 1.0.3-3
    m2w64-mpfr: 3.1.4-4
    m2w64-pkg-config: 0.29.1-2
    m2w64-toolchain: 5.3.0-7
    m2w64-tools-git: 5.0.0.4592.90b8472-2
    m2w64-windows-default-manifest: 6.4-3
    m2w64-winpthreads-git: 5.0.0.4634.697f757-2
    m2w64-zlib: 1.2.8-10
    mako: 1.0.7-py36he15cdb7_0
    msys2-conda-epoch: 20160418-1
    pygpu: 0.6.9-py36_0
    theano: 0.9.0-py36_0

    Proceed ([y]/n)? y

    CondaIOError: Missing write permissions in: C:\ProgramData\Anaconda3
    #
    # You don’t appear to have the necessary permissions to install packages
    # into the install area ‘C:\ProgramData\Anaconda3’.
    # 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=”C:\ProgramData\Anaconda3″

    • Avatar
      Jason Brownlee November 16, 2017 at 10:33 am #

      You might have a permissions issue on your machine?

  149. Avatar
    John November 29, 2017 at 1:33 pm #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  150. Avatar
    sona November 29, 2017 at 4:39 pm #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  151. Avatar
    Nour November 30, 2017 at 8:30 pm #

    I have to write a python program to load pre-trained vectors and compute cosine similarities. And i have to adapt it to compute the 353 similarities on the two given word embedded models and then to compute the correlation with human judgement.
    Using the two models:
    – Word2Vec
    – Glove

    I want to know what i need exactly tod perform this work.

  152. Avatar
    David Wilkins December 1, 2017 at 10:05 am #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  153. Avatar
    Augustine Asare December 1, 2017 at 12:09 pm #

    Hi Jason how what platform do you use to make you blog posts. I am build an ML blog and I want to be able to include the code snippets.

  154. Avatar
    Albert December 7, 2017 at 5:55 pm #

    Hi Jason,
    >>> import theano
    >>> print(‘theano: %s’ % theano.__version__)
    theano: 0.9.0.dev-425cb8effc7958e8ca376b023d8344b7620a9622
    >>> # tensorflow
    … import tensorflow
    >>> print(‘tensorflow: %s’ % tensorflow.__version__)
    tensorflow: 1.4.0
    >>> # keras
    … import keras
    Using TensorFlow backend.
    >>> print(‘keras: %s’ % keras.__version__)
    keras: 2.1.2

  155. Avatar
    nazek hassouneh December 11, 2017 at 9:15 am #

    after install thano then install tensoflow
    and i have a window 10 and typping the same command you wrote
    but when install keras i have a problem these is a message

    (C:\Users\NAZEK – PC\Anaconda3) C:\Users\NAZEK – PC>cd ..

    (C:\Users\NAZEK – PC\Anaconda3) C:\Users>cd ..

    (C:\Users\NAZEK – PC\Anaconda3) C:\>pip install keras
    Collecting keras
    Exception:
    Traceback (most recent call last):
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\basecommand.py”, line 215, in main
    status = self.run(options, args)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\commands\install.py”, line 335, in run
    wb.build(autobuilding=True)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\wheel.py”, line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\req\req_set.py”, line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\req\req_set.py”, line 554, in _prepare_file
    require_hashes
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\req\req_install.py”, line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 568, in _get_pages
    page = self._get_page(location)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 811, in get_page
    inst = cls(resp.content, resp.url, resp.headers)
    File “C:\Users\NAZEK – PC\Anaconda3\lib\site-packages\pip\index.py”, line 731, in __init__
    namespaceHTMLElements=False,
    TypeError: parse() got an unexpected keyword argument ‘transport_encoding’

    (C:\Users\NAZEK – PC\Anaconda3) C:\>
    please help me

    • Avatar
      Jason Brownlee December 11, 2017 at 4:52 pm #

      I’m sorry to hear that, I don’t have any good ideas. Perhaps post the error on StackOverflow?

    • Avatar
      Hk February 10, 2018 at 5:51 am #

      I am not sure if you were able to solve this problem, but I was able to solve it by below command:

      conda install pip

      Let me know if it helps!

      H

  156. Avatar
    Suman Rai December 11, 2017 at 11:24 pm #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1
    ————————
    theano: 0.9.0.dev-425cb8effc7958e8ca376b023d8344b7620a9622
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.1.2

  157. Avatar
    NV December 13, 2017 at 9:42 am #

    theano: 0.9.0.dev-unknown-git
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.0.8

  158. Avatar
    Robert December 13, 2017 at 12:21 pm #

    Hi Jason,

    having trouble with installing scikit learn. getting a syntax error: invalid syntax

    • Avatar
      Jason Brownlee December 13, 2017 at 4:13 pm #

      Ensure you are on the command prompt and not in the Python REPL.

  159. Avatar
    Mei December 13, 2017 at 5:32 pm #

    Running Versions.py

    scipy: 1.0.0
    numpy: 1.12.3
    matplotlib: 2.1.1
    pandas: 0.21.1
    statsmodels: 0.8.0
    sklearn: 0.19.1

    However, I’m currently running issues on importing theano in python. I was able to download it with the “conda install theano” command, but when I try to import, python crashes and some of the traceback is shown below:

    ^. C:\Users\Mei\AppData\Local\Theano\compiled
    ir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.
    14-64\lazylinker_ext\mod.cpp:744:33: error: ‘struct CLazyLinker’ has no member n
    amed ‘node_n_inputs’. for (int i = 0; i node_n_inputs[owner_idx];

    Any suggestions on how to tackle this issue?

    • Avatar
      Jason Brownlee December 14, 2017 at 5:34 am #

      Perhaps try installing TensorFlow instead?

      • Avatar
        Mei December 14, 2017 at 12:06 pm #

        Ended up switching to canopy, but everything works now! Current output for both scripts as follows:

        scipy: 1.0.0
        numpy: 1.12.3
        matplotlib: 2.1.1
        pandas: 0.21.1
        statsmodels: 0.8.0
        sklearn: 0.19.1

        theano: 1.0.1
        Using Theano backend
        Keras: 2.1.2

        Thank you for running such an awesome website!

  160. Avatar
    Rohith R Nair December 14, 2017 at 6:39 pm #

    Thanks for the post.

    Is there any specific reason why you are using pip for installing keras instead of
    conda install -c conda-forge keras?

    • Avatar
      Jason Brownlee December 15, 2017 at 5:30 am #

      Yes, I believed pip was kept more up to date, you can use anything you wish.

  161. Avatar
    Zulkafil Abbas December 15, 2017 at 3:51 pm #

    Thank You for the guide:

    Here are my outputs:
    scipy: 1.0.0
    numpy: 1.13.3
    matplotlib: 2.1.1
    pandas: 0.21.1
    statsmodels: 0.8.0
    sklearn: 0.19.1
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.0.8

  162. Avatar
    Jahongir December 18, 2017 at 9:06 am #

    theano: 0.9.0.dev-unknown-git
    tensorflow: 1.4.0
    keras: 2.0.8

  163. Avatar
    Nawaz December 19, 2017 at 6:00 pm #

    Thanks for the guide
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  164. Avatar
    Joel Underwood December 20, 2017 at 3:57 am #

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

  165. Avatar
    Klinsman Maia December 20, 2017 at 10:02 am #

    scipy: 0.18.1
    numpy: 1.11.1
    matplotlib: 1.5.3
    pandas: 0.18.1
    statsmodels: 0.6.1
    sklearn: 0.17.1

  166. Avatar
    Aaron Hallmark December 24, 2017 at 11:52 pm #

    I got the following:

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  167. Avatar
    Mahesh December 28, 2017 at 2:53 pm #

    With little struggle for Keras installation ( I mean after “conda install pip” twice)..
    Python: 3.6.2
    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    sklearn: 0.19.1

    &
    tensorflow: 1.3.0
    Using TensorFlow backend.
    keras: 2.1.2

  168. Avatar
    John Newell December 29, 2017 at 6:54 am #

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

  169. Avatar
    John Newell December 29, 2017 at 7:08 am #

    Johns-MacBook-Pro-2:pyscripts jdnewell$ 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.19.0
    /Users/jdnewell/anaconda3/lib/python3.6/site-packages/theano/configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
    warnings.warn(“DeprecationWarning: there is no c++ compiler.”
    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.
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.1
    /Users/jdnewell/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module ‘tensorflow.python.framework.fast_tensor_util’ does not match runtime version 3.6
    return f(*args, **kwds)
    tensorflow: 1.4.1
    Using TensorFlow backend.
    keras: 2.1.2

    • Avatar
      Jason Brownlee December 29, 2017 at 2:34 pm #

      It looks like warnings that you could ignore.

      Perhaps there is documentation on how you can install an alternate version better suited to your specific hardware?

  170. Avatar
    nuno December 29, 2017 at 8:29 pm #

    Great, got my environment up and running.
    First you need to downgrade python as suggested to 3.5.
    Theano I had to install specific version as upgrade result in error

    scipy: 1.0.0
    numpy: 1.13.3
    matplotlib: 2.1.1
    pandas: 0.21.1
    statsmodels: 0.8.0
    sklearn: 0.19.1
    theano: 0.8.2
    tensorflow: 1.2.1
    Using Theano backend.
    keras: 2.0.8

  171. Avatar
    Anchal December 30, 2017 at 6:23 pm #

    Thank you Jason for such a comprehensive writing. MachineLearningMastery truely making marks in creating masters of machine learning.

  172. Avatar
    jps December 31, 2017 at 8:05 am #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1
    theano: 0.9.0.dev-unknown-git
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.0.9

  173. Avatar
    Lynard January 3, 2018 at 4:34 am #

    Thank you for this incredibly useful blog. I have programmed in assembly language, pascal Delphi and C++. I started an AI project in Delphi and thought PYTHON should be a much easier track, so I went with Anaconda3. Little did I know that I would be spending most of my time simply trying to reconcile the differences between documented language usage and the updated Python 3.5.

    Here is my output from following your instructions:
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.1.2

    Writing computer instructional material is very difficult and is a unique skill. Your instructions are clear, precise and on point. Glad I found your blog, glad I found your book. I’ve signed up for you email.

  174. Avatar
    Tamiselvan S January 5, 2018 at 12:38 am #

    how to install tensorflow in windows 32 bit, i have searching this for past 1 week, i know it is a basic question but i need a help.

    I have tried most of the way by setting virtual environment thing and all.

    (tensorflow)C:> pip install — ignore-installed — upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

    above mentioned query is working but it is for 64 bit and i need for 32 bit.
    could you please help me.

  175. Avatar
    vlad January 5, 2018 at 3:37 am #

    i’ve had about enough with import errors and labelencoder errors. tried to setup the environment several times on mac os and windows 10, followed these instructions each time and each time i got proper versions for the installed packages. it all goes south when i try to import the packages or when i execute the labelencoder command. i’m this close to installing linux and trying it over there. but really, it’s the 5th time i’m reinstalling anaconda3 and pycharm, frustrating as F!@#.

    • Avatar
      Jason Brownlee January 5, 2018 at 5:30 am #

      Sorry to hear that. The tutorial has seemed to work for tens of thousands of others.

      – Perhaps you need to reboot after install?
      – Perhaps you have 2 versions of Python installed accidentally, e.g. Python and anaconda?
      – Perhaps you are trying to run code in the wrong place?

      What errors are you getting exactly?

      • Avatar
        Vlad January 7, 2018 at 4:35 am #

        The errors i’ve encountered were diverse, haven’t written them down because i’ve always tried to do fresh installs hoping it will work. Thanks for the reply, i’ll talk to some programmer friends of mine, surely they can help. I’ll get back to you if i’ve got better questions 😛

  176. Avatar
    Yulia January 6, 2018 at 8:16 am #

    i’m using a 3 year old MacBook pro without any special video cards. is it safe to install deep learning libraries? I heard somewhere that it will burn the processor? (I’m completely new to this, sorry if the questions are dumb…).

    Also, do you suggest Theano or Tensorflow for the macbook? Is there any difference for when actually using them?

    I’m still learning with a plan of getting to do Kaggle competitions.

    I already have anaconda and scikitlearn installed

  177. Avatar
    Joao Luiz Souza Torres January 9, 2018 at 12:46 pm #

    Good Night

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0

  178. Avatar
    Avminus January 10, 2018 at 4:25 am #

    could you please give a tutorial which shows how to use the workstation I am totally confused about using the anaconda app.
    P.S- I have successfully installed all what mentioned above.
    TIA

    • Avatar
      Jason Brownlee January 10, 2018 at 5:31 am #

      I recommend using a text editor and running Python files on the command line.

  179. Avatar
    srikanth January 12, 2018 at 6:20 pm #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  180. Avatar
    thuraya January 14, 2018 at 7:47 am #

    Hello Dr. Jason Brownlee
    I want to ask you, how to download tweets from hashtags or from users on Twitter to visualization data?
    I use anaconda with the package tweepy, and my the OS windows.
    can you help me, please?
    thank you about the steps of machine learning, the output for me is
    scipy: 0.19.1
    numpy: 1.13.3
    matplot lib : 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.1
    sklearn : 0.19.1

    • Avatar
      Jason Brownlee January 15, 2018 at 6:54 am #

      I don’t know about downloading twiter hashtags sorry.

  181. Avatar
    Richard January 15, 2018 at 3:22 am #

    Thanks Jason, so far so good! 🙂

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

    • Avatar
      Richard January 15, 2018 at 4:14 am #

      And after some grappling:

      theano: 1.0.1
      tensorflow: 1.4.0
      Using TensorFlow backend.
      keras: 2.1.2

      …phew.

    • Avatar
      Jason Brownlee January 15, 2018 at 7:00 am #

      Nice work!

  182. Avatar
    Budi January 15, 2018 at 3:49 am #

    WOW,, Cool, i think this is more hard, but you explain it, and everything like piece of cake..

    Thanks you so much..

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  183. Avatar
    Sibghat January 15, 2018 at 7:04 am #

    i can see the libraries (matplotlib, statsmodels) installed but when i import them to my program, it gives me error. like module not found. i have set the enviroment variables as well, installed python, Anaconda, and updated both. still no use. kindly help me i am not getting any help from any other sites as well.

  184. Avatar
    Reshma CB January 15, 2018 at 5:35 pm #

    Your suggestions for working with NLP – Is it better to use Spacy or scikit or textblob. Pls suggest

  185. Avatar
    thetthethtwe January 16, 2018 at 6:52 pm #

    Error:::

    (C:\Users\Mpkyut\Anaconda3) C:\Users\Mpkyut\Desktop\pytest>python deep_version.p
    y
    Traceback (most recent call last):
    File “C:\Users\Mpkyut\Anaconda3\lib\configparser.py”, line 1138, in _unify_val
    ues
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configparser.py”, lin
    e 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “C:\Users\Mpkyut\Anaconda3\lib\configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “C:\Users\Mpkyut\Anaconda3\lib\configparser.py”, line 1141, in _unify_val
    ues
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configparser.py”, lin
    e 328, in __get__
    delete_key=delete_key)
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configparser.py”, lin
    e 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_version.py”, line 2, in
    import theano
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\__init__.py”, line 12
    4, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\scan_module\__init__.
    py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.
    py”, line 60, in
    from theano import tensor, scalar
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\tensor\__init__.py”,
    line 17, in
    from theano.tensor import blas
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line
    155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\tensor\blas_headers.p
    y”, line 987, in
    if not config.blas.ldflags:
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configparser.py”, lin
    e 332, in __get__
    val_str = self.default()
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configdefaults.py”, l
    ine 1430, in default_blas_ldflags
    check_mkl_openmp()
    File “C:\Users\Mpkyut\Anaconda3\lib\site-packages\theano\configdefaults.py”, l
    ine 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_
    LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU”
    in your environement.

    (C:\Users\Mpkyut\Anaconda3) C:\Users\Mpkyut\Desktop\pytest>

    • Avatar
      Jason Brownlee January 17, 2018 at 9:56 am #

      Looks like there may be issues with your installation.

      Perhaps try posting your error to stackoverflow?

      • Avatar
        Arturo Moncada-Torres January 23, 2018 at 11:19 am #

        I had a similar issue and solved it by following the next steps:

        1. Go to the Windows search on the task bar and look for “Edit the system environment variables”. The best match be something in the control panel. Click it.
        2. Click on “Environment Variables…”
        3. Click on “New…”. In “Variable name” fill in “MKL_THREADING_LAYER”. In “Variable value” fill in “GNU” (no quotations in any case)
        4. Click “OK” on each open dialogue
        5. Restart Windows.

        That did it for me!

        Last but not least, thank you, Jason, for such a helpful tutorial

        • Avatar
          Jason Brownlee January 24, 2018 at 9:47 am #

          Thanks for sharing!

        • Avatar
          jesus January 25, 2018 at 8:48 am #

          thanks!!!!!!!

        • Avatar
          David Chung February 22, 2018 at 7:57 pm #

          It works to me as well. Thanks!!

        • Avatar
          Kevin March 7, 2019 at 3:50 am #

          Thank you, Arturo. Also it looks like you don’t have to restart Windows, just the console session.

          theano: 1.0.3
          tensorflow: 1.13.1
          Using TensorFlow backend.
          keras: 2.2.4

  186. Avatar
    Abdullah Nabil January 16, 2018 at 10:34 pm #

    First Thanks a lot for the good Steps.

    theano: 1.0.1
    tensorflow: 1.4.0
    keras: 2.1.2

  187. Avatar
    Piotr January 21, 2018 at 6:07 am #

    Hi Jason,
    (C:\ProgramData\Anaconda3) e:\emachine\python-projects>python version.py
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

    but the deep_version does not like Theano on Win10 I suppose:
    (C:\ProgramData\Anaconda3) e:\emachine\python-projects>python deep_versions.py
    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 1138, in _unify_values
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 1141, in _unify_values
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 328, in __get__
    delete_key=delete_key)
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
    check_mkl_openmp()
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

    Only when I commented out the Theano part I ‘ve got:

    (C:\ProgramData\Anaconda3) e:\emachine\python-projects>python deep_versions.py
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.1.3

    Thank you very much for those tutorials!
    Kind regrds,
    Piotr

    • Avatar
      Jason Brownlee January 21, 2018 at 9:13 am #

      Nice, ignore Theano and stick to tensorflow then.

  188. Avatar
    Hardian Oktavianto January 23, 2018 at 3:34 pm #

    Is it work if I use python 2.7 version?

  189. Avatar
    Atefeh January 25, 2018 at 11:50 pm #

    Hello
    thank you for your help for installing Anaconda .
    I have done steps on your procedure, until step 5 for installing theano .
    l got the below error.
    I would really thank you ,if you help me.

    Downloading and Extracting Packages
    certifi 2017.11.5: ############################################################################################ | 100%
    openssl 1.0.2n: #####################################################5 | 56%
    ca-certificates 2017.08.26: ################################################################################### | 100%
    conda 4.4.7: ################################################################################################## | 100%
    m2w64-gcc 5.3.0: ############################################################################################## | 100%

    CondaError: Downloaded bytes did not match Content-Length
    url: https://repo.continuum.io/pkgs/main/win-64/openssl-1.0.2n-h74b6da3_0.tar.bz2
    target_path: C:\Users\ASUS\Anaconda3\pkgs\openssl-1.0.2n-h74b6da3_0.tar.bz2
    Content-Length: 5622655
    downloaded bytes: 4225957

  190. Avatar
    Atefeh January 26, 2018 at 12:11 am #

    hello
    I again face to a new error during installing tensorflow:

    (base) C:\Users\ASUS>conda install -c conda-forge tensorflow
    Solving environment: done

    ## Package Plan ##

    environment location: C:\Users\ASUS\Anaconda3

    added / updated specs:
    – tensorflow

    The following packages will be downloaded:

    package | build
    —————————|—————–
    tensorflow-1.4.0 | py36_0 24.4 MB conda-forge
    ca-certificates-2017.11.5 | 0 182 KB conda-forge
    conda-4.3.33 | py36_0 539 KB conda-forge
    ————————————————————
    Total: 25.1 MB

    The following NEW packages will be INSTALLED:

    markdown: 2.6.9-py36_0 conda-forge
    protobuf: 3.5.1-py36_vc14_3 conda-forge [vc14]
    tensorboard: 0.4.0rc3-py36_2 conda-forge
    tensorflow: 1.4.0-py36_0 conda-forge

    The following packages will be UPDATED:

    ca-certificates: 2017.08.26-h94faf87_0 anaconda –> 2017.11.5-0 conda-forge
    certifi: 2017.11.5-py36hb8ac631_0 anaconda –> 2017.11.5-py36_0 conda-forge
    openssl: 1.0.2n-h74b6da3_0 anaconda –> 1.0.2n-vc14_0 conda-forge [vc14]

    The following packages will be DOWNGRADED:

    bleach: 2.0.0-py36h0a7e3d6_0 –> 1.5.0-py36_0 conda-forge
    conda: 4.4.7-py36_0 anaconda –> 4.3.33-py36_0 conda-forge
    html5lib: 0.999999999-py36ha09b1f3_0 –> 0.9999999-py36_0 conda-forge
    zlib: 1.2.11-vc14h1cdd9ab_1 –> 1.2.11-vc14_0 conda-forge [vc14]

    Proceed ([y]/n)? y

    Downloading and Extracting Packages
    tensorflow 1.4.0: ############################################################################################# | 100%
    ca-certificates 2017.11.5: #################################################################################### | 100%
    conda 4.3.33: ################################################################################################# | 100%
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    The batch file cannot be found.

    thanks for your help

  191. Avatar
    Hugues Laliberte January 26, 2018 at 6:57 am #

    Hey Jason, this is really precious help !
    I’ve installed everything without any error messages, on Mac OS 10.13.2
    >>> theano.__version__
    ‘1.0.1’
    >>> tensorflow.__version__
    ‘1.4.0’
    >>> keras.__version__
    ‘2.1.3’
    >>>

  192. Avatar
    Atefeh January 26, 2018 at 3:08 pm #

    at the last line ,”the batch file can not be found ” dose not make any problem?
    thanks alot

  193. Avatar
    Nindita January 30, 2018 at 12:08 am #

    I use container – https://hub.docker.com/r/continuumio/anaconda3/ and update it based on your instructions above.

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  194. Avatar
    Dpaulajr January 31, 2018 at 9:46 am #

    I get these versions:

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  195. Avatar
    Yiyi Yang January 31, 2018 at 5:29 pm #

    Hi, Thank you so much for the step-by-step tutorial, it’s extremely helpful!!!
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

    I will follow the instructions in your article of first ML project to finish my ML prediction project. Thank you soooooo much!!!!

  196. Avatar
    Rami February 2, 2018 at 4:02 am #

    Hi , i use Python 3.6.3 |Anaconda custom (64-bit) ubuntu 16.04 64 bits. I have an import error of tensorflow. How to solve it? Thanks

    ModuleNotFoundError Traceback (most recent call last)
    in ()
    —-> 1 import tensorflow as tf

    ModuleNotFoundError: No module named ‘tensorflow’

  197. Avatar
    Rami February 2, 2018 at 8:35 pm #

    I installed tensorflow. I did the following steps:

    1. conda create -n tensorflow pip python=3.6
    2. source activate tensorflow
    3. pip install –ignore-installed –upgrade \ https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.5.0-cp36-cp36m-linux_x86_64.whl

  198. Avatar
    Atefeh February 3, 2018 at 4:19 am #

    Hello
    typing the code of Lesson 05: First Neural Net in Keras in the free mini course,

    how can I find what is my current working directory to download the database “pima-indians-diabetes.csv.”?

    I download it from internet and then upload it in ” Anaconda3, Lib, site-packages, keras, datasets ,”

    but again I face to this error,please help me…

    from keras.models import Sequential
    2 from keras.layers import Dense
    3 import numpy
    4 seed = 7
    5 numpy.random.seed(seed)
    6 # Load the dataset
    7 dataset = numpy.loadtxt(“pima-indians-diabetes.csv”, delimiter=”,”)

    FileNotFoundError Traceback (most recent call last)
    in ()
    —-> 1 dataset = numpy.loadtxt(“pima-indians-diabetes.csv”, delimiter=”,”)

    ~\Anaconda3\lib\site-packages\numpy\lib\npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin)
    896 fh = iter(open(fname, ‘U’))
    897 else:
    –> 898 fh = iter(open(fname))
    899 else:
    900 fh = iter(fname)

    FileNotFoundError: [Errno 2] No such file or directory: ‘pima-indians-diabetes.csv’

    • Avatar
      Jason Brownlee February 3, 2018 at 8:43 am #

      I recommend working from the command line.

      The “current directory” is the directory on the command line where the code and data are located and the same place from where you execute the script.

  199. Avatar
    Rami February 3, 2018 at 8:37 pm #

    I instal tensorflow under anaconda as indicated above but the same problem:

    ModuleNotFoundError: No module named ‘tensorflow’

    I do not know where the problem

    • Avatar
      Jason Brownlee February 4, 2018 at 5:10 am #

      The error suggests tensorflow is not installed or is installed but is not available in the python environment you have started.

  200. Avatar
    Kjell Krona February 6, 2018 at 12:51 am #

    These are the versions I got after I installed the Deep Learning libraries today, 5 Feb 2018:

    theano: 1.0.1
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.1.3

    I would like to add that I looked up the instructions for installing TensorFlow on WIn7, which requested that I set up a special “tensorflow space” in conda first. By then I had already installed theano, and after installing tensorflow I left the “tensorflow space” and installed keras.

    Nothing worked then; but after going back to the “tensorflow space” and again installed theano and keras there, everything worked fine. So keep an eye on any change of “space in conda you might be asked to do; an installation is “space-specific”. See also “https://www.tensorflow.org/install/install_windows”.

    It also seems that in order to have a “good” implementation of theano, you need a c++ compiler installed. Without that, you apparently get a low-performance version of (some?) libraries.

  201. Avatar
    Skip Cave February 7, 2018 at 8:13 pm #

    Thanks for the tutorial.
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  202. Avatar
    Rebecca Goh February 7, 2018 at 8:23 pm #

    i encountered an error:

    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environment.’)

    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environment.

    any idea how to resolve this?

    • Avatar
      Jason Brownlee February 8, 2018 at 8:24 am #

      Sorry, I have not seen this error.

      Perhaps try searching/posting on stackoverflow?

  203. Avatar
    Andrz February 8, 2018 at 5:33 am #

    Hi! I’m having a problem here (Windows machine):

    (base) C:\Users\andrz>python deep_versions.py
    Traceback (most recent call last):
    File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 1138, in _unify_values
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 1141, in _unify_values
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 328, in __get__
    delete_key=delete_key)
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
    check_mkl_openmp()
    File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

    • Avatar
      Jason Brownlee February 8, 2018 at 8:31 am #

      Perhaps try posting on stackoverflow?

      • Avatar
        Andrz February 9, 2018 at 3:38 am #

        This worked: “set MKL_THREADING_LAYER=GNU”

        But now I got:

        theano: 1.0.1
        Traceback (most recent call last):
        File “deep_versions.py”, line 5, in
        import tensorflow
        ModuleNotFoundError: No module named ‘tensorflow’

        The instructions said that I don’t need tensorflow if I install Theano. Does it mean I’m goof to go further now?

        • Avatar
          Jason Brownlee February 9, 2018 at 9:14 am #

          Nice work!

          Yes, just one of tensorflow or theano is required.

  204. Avatar
    Luis carl February 8, 2018 at 6:35 am #

    versions.py

    scipy: 1.0.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.19.1
    scipy: 1.0.0
    numpy: 1.12.1
    matplotlib: 2.0.2
    pandas: 0.20.1
    statsmodels: 0.8.0
    sklearn: 0.19.1

    deep_versions.py

    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.1.3

  205. Avatar
    Supriya Karambe February 12, 2018 at 8:59 am #

    HI,

    I am getting following error for theano

    Exception: Compilation failed (return status=1): In file included from /Users/Supriya/.theano/compiledir_Darwin-17.4.0-x86_64-i386-64bit-i386-3.6.3-64/lazylinker_ext/mod.cpp:1:. In file included from /Users/Supriya/anaconda3/include/python3.6m/Python.h:25:. /Users/Supriya/anaconda3/bin/../include/c++/v1/stdio.h:108:15: fatal error: ‘stdio.h’ file not found. #include_next . ^~~~~~~~~. 1 error generated..

    • Avatar
      Jason Brownlee February 12, 2018 at 2:49 pm #

      I’m sorry to heat that, I have not seen this error. Perhaps try searching/posting on stackoverflow?

      • Avatar
        mars May 4, 2020 at 2:28 am #

        Yeah Im getting the same thing!

    • Avatar
      Francis Macapobre February 19, 2019 at 11:52 am #

      I am getting the same error

  206. Avatar
    Johnathan Lightfoot February 12, 2018 at 10:05 am #

    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.0
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.1

  207. Avatar
    Shawn February 12, 2018 at 12:55 pm #

    $ python3 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

  208. Avatar
    Timmy February 12, 2018 at 9:59 pm #

    Heyy, I’m pretty new to the site. I have been exploring it and it seems like I’ve found a breath of fresh air from the textbooks I’ve been reading. Great work on the site and the level of your responsiveness to each comment is really nice. Please keep up the good work.

  209. Avatar
    sameer February 13, 2018 at 5:51 pm #

    $ python ver2.py
    tensorflow: 1.4.1
    Using TensorFlow backend.
    2018-02-13 12:20:13.042725: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
    keras: 2.0.9

  210. Avatar
    james February 13, 2018 at 11:54 pm #

    scipy: 1.0.0
    numpy: 1.13.3
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.1
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.1.3
    Thanks Jason!

  211. Avatar
    james February 14, 2018 at 12:22 am #

    Hi Jason,
    I installd all the library.
    I got :
    sklearn: 0.19.1
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.1

    I searched StackOverFlow.This can be fixed by:
    sudo apt-get install libblas-dev

    but I’m running on Windows.Do you know how to install libblas-dev on Windows10?

  212. Avatar
    James McEwan February 15, 2018 at 2:57 am #

    I wonder if one ought to consider downgrading tensorflow when performing the installation on an iMac Pro. It would appear that the GPU is not used in the version I have installed. Do you have any recommendations for setting ML/DL environment tailored for an iMac Pro (mine has 18 cores). I want to make sure it takes full advantage of the hardware. I can confirm Anaconda does use the 18 cores, however I do not see hyper threading taking place, nor is the GPU being used.

  213. Avatar
    Cor Colijn February 16, 2018 at 9:12 am #

    Hi Jason,

    Here’s my output.
    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

    Regards,
    Cor

  214. Avatar
    Niketa Gandhi February 17, 2018 at 9:05 am #

    I am completely new to this. I tried following the above steps and am getting this error. Its Windows machine so as per the advice have not done

    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.1
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    Please help

    • Avatar
      Jason Brownlee February 18, 2018 at 6:43 am #

      It looks like you have Theano installed and you got a warning. You can ignore the warning.

      It also looks like you might need to change the configuration of Keras to use Theano instead of tensorflow. You can do that in the ~/.keras/keras.json config file.

      Then comment out the line in deep_versions.py for tensorflow and try re-running it.

      Let me know how you go.

      • Avatar
        Niketa Gandhi February 28, 2018 at 8:27 am #

        This is what I get:

        (base) C:\Users\Niketa Gandhi>python deep_versions.py
        WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
        theano: 1.0.1
        C:\Users\Niketa Gandhi\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
        from ._conv import register_converters as _register_converters
        Using Theano backend.
        keras: 2.1.4

        (base) C:\Users\Niketa Gandhi>

        =====

        My files

        keras
        {
        “floatx”: “float32”,
        “epsilon”: 1e-07,
        “backend”: “theano”,
        “image_data_format”: “channels_last”
        }

        deep_versions

        # theano
        import theano
        print(‘theano: %s’ % theano.__version__)
        # tensorflow
        #import tensorflow
        #print(‘tensorflow: %s’ % tensorflow.__version__)
        # keras
        import keras
        print(‘keras: %s’ % keras.__version__)

        • Avatar
          Jason Brownlee March 1, 2018 at 6:03 am #

          Nice work!

          You can ignore those warnings I believe.

  215. Avatar
    Sheng February 17, 2018 at 3:11 pm #

    scipy: 0.19.0
    numpy: 1.11.3
    matplotlib: 1.5.3
    pandas: 0.18.1
    Traceback (most recent call last):
    File “versions.py”, line 14, in
    import statsmodels
    File “C:\Users\ransh\g2conda\lib\site-packages\statsmodels\__init__.py”, line 8, in
    from .tools.sm_exceptions import (ConvergenceWarning, CacheWriteWarning,
    File “C:\Users\ransh\g2conda\lib\site-packages\statsmodels\tools\__init__.py”, line 1, in
    from .tools import add_constant, categorical
    File “C:\Users\ransh\g2conda\lib\site-packages\statsmodels\tools\tools.py”, line 9, in
    from statsmodels.distributions import (ECDF, monotone_fn_inverter,
    File “C:\Users\ransh\g2conda\lib\site-packages\statsmodels\distributions\__init__.py”, line 1, in
    from .empirical_distribution import ECDF, monotone_fn_inverter, StepFunction
    File “C:\Users\ransh\g2conda\lib\site-packages\statsmodels\distributions\empirical_distribution.py”, line 5, in
    from scipy.interpolate import interp1d
    File “C:\Users\ransh\g2conda\lib\site-packages\scipy\interpolate\__init__.py”, line 176, in
    from .interpolate import *
    File “C:\Users\ransh\g2conda\lib\site-packages\scipy\interpolate\interpolate.py”, line 21, in
    import scipy.special as spec
    File “C:\Users\ransh\g2conda\lib\site-packages\scipy\special\__init__.py”, line 640, in
    from ._ufuncs import *
    ImportError: DLL load failed: The specified module could not be found.

    • Avatar
      Jason Brownlee February 18, 2018 at 6:47 am #

      I’m sorry to hear that. Perhaps try searching/posting your error on stackoverflow?

  216. Avatar
    Gerard Boxelaar February 19, 2018 at 4:12 am #

    Hi Jason,

    I got:
    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

    Thanx,

    Gerard

  217. Avatar
    Syed Muslim February 19, 2018 at 10:09 pm #

    theano: 1.0.1
    Using Theano backend.
    keras: 2.1.4

  218. Avatar
    David Chung February 22, 2018 at 7:29 pm #

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

  219. Avatar
    David Chung February 22, 2018 at 7:56 pm #

    theano: 1.0.1
    C:\XXXXX\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
    from ._conv import register_converters as _register_converters
    tensorflow: 1.4.0
    Using TensorFlow backend.
    keras: 2.1.4

  220. Avatar
    Arnab February 28, 2018 at 6:01 am #

    In the step last step I was facing an issue “RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.”. Installing mkl solved it for me.
    e.g:
    “conda install mkl=2017”

  221. Avatar
    Sabarinath March 2, 2018 at 7:25 pm #

    Thanks for your newbie help.
    python versions.py
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.0

    python deep_versions.py
    theano: 1.0.1
    RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
    ImportError: numpy.core.multiarray failed to import
    ImportError: numpy.core.umath failed to import
    ImportError: numpy.core.umath failed to import
    2018-03-02 13:51:23.044692: F tensorflow/python/lib/core/bfloat16.cc:664] Check failed: PyBfloat16_Type.tp_base != nullptr
    Aborted (core dumped)

    This is after i installed mkl=2017.
    Any ideas?

    • Avatar
      Jason Brownlee March 3, 2018 at 8:09 am #

      Ouch. TensorFlow looks broken. Perhaps forget TensorFlow and use Keras with Theano?

    • Avatar
      Gurubux Gill March 5, 2019 at 1:58 am #

      I face the Same Problem, any solutions found ? please share.

  222. Avatar
    S.Won March 7, 2018 at 10:39 pm #

    Hi Jason, I did follow your guide above. Everything ok except for DL part below….
    Any idea on it ?
    Pls let me know your thoughts on it. Thanks in advance !!!
    ****************************************************************************************

    python deep_versions.py
    Traceback (most recent call last):
    File “/home/shw04r/anaconda3/lib/python3.6/configparser.py”, line 1138, in _unify_values
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configparser.py”, line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “/home/shw04r/anaconda3/lib/python3.6/configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “/home/shw04r/anaconda3/lib/python3.6/configparser.py”, line 1141, in _unify_values
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configparser.py”, line 328, in __get__
    delete_key=delete_key)
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configparser.py”, line 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/scan_module/__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/scan_module/scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/tensor/__init__.py”, line 17, in
    from theano.tensor import blas
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/tensor/blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/tensor/blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configparser.py”, line 332, in __get__
    val_str = self.default()
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configdefaults.py”, line 1408, in default_blas_ldflags
    check_mkl_openmp()
    File “/home/shw04r/anaconda3/lib/python3.6/site-packages/theano/configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

    • Avatar
      Jason Brownlee March 8, 2018 at 6:31 am #

      Sorry, I have not seen this error, perhaps try posting your error to stackoverflow?

    • Avatar
      Goutam March 25, 2018 at 2:42 pm #

      Please follow below steps to resolve this issue:
      1. conda install mkl=2018
      2. Add a New environment variable, and set name to MKL_THREADING_LAYER, and value to GNU. This then allowed to execute import theano from the python shell.

      • Avatar
        Sanjeev May 13, 2018 at 5:32 pm #

        Thanks Goutam, It worked
        tensorflow: 1.8.0
        Using TensorFlow backend.
        keras: 2.1.6
        theano: 1.0.1
        tensorflow: 1.8.0
        keras: 2.1.6

  223. Avatar
    chen long March 13, 2018 at 6:50 pm #

    I got
    scipy: 1.0.0
    numpy: 1.13.3
    matplotlib: 2.2.0
    pandas: 0.22.0

  224. Avatar
    Anna March 14, 2018 at 1:42 am #

    Hi, sorry to be one of those people who is posting error messages .. but have you happened to have seen this one? I will try stack overflow too.

    RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
    ImportError: numpy.core.multiarray failed to import
    ImportError: numpy.core.umath failed to import
    ImportError: numpy.core.umath failed to import
    2018-03-13 10:41:29.474912: F tensorflow/python/lib/core/bfloat16.cc:664] Check failed: PyBfloat16_Type.tp_base != nullptr
    Abort trap: 6

    • Avatar
      Anna March 14, 2018 at 1:44 am #

      Never mind! Fixed!

    • Avatar
      Jason Brownlee March 14, 2018 at 6:28 am #

      Oh dear. Does not look good. I have not seen this, but perhaps try Theano instead of TensorFlow?

  225. Avatar
    Hervaldo March 18, 2018 at 11:01 am #

    theano: 1.0.1
    tensorflow: 1.5.0
    Traceback (most recent call last):
    File “deep_versions.py”, line 8, in
    import keras
    ModuleNotFoundError: No module named ‘keras’

    I have installed Keras by pip and conda. it is installed at envs/base, but cannot solve the problem.

  226. Avatar
    Hervaldo March 18, 2018 at 11:16 am #

    File “C:\Users\HCARVALH\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\index.py”, line 731, in __init__
    namespaceHTMLElements=False,
    TypeError: parse() got an unexpected keyword argument ‘transport_encoding’
    You are using pip version 9.0.1, however version 9.0.2 is available.
    You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.

    I could not install Keras by pip and I installed by conda at …envs/base but the script didn’t find it

  227. Avatar
    Vijay March 22, 2018 at 12:37 am #

    Simple…Awesome…

  228. Avatar
    Sreeni Vasan March 22, 2018 at 12:53 am #

    good evening sir ! I started Installing Anaconda today ,but I got a pop up “ANACONDA FAILED TO CREATE MENUS”
    Please help me to resolve this issue sir.

    • Avatar
      Jason Brownlee March 22, 2018 at 6:25 am #

      Sorry, I have not seen this error. Perhaps post on stackoverflow?

  229. Avatar
    Goutam March 25, 2018 at 2:38 pm #

    (base) C:\WINDOWS\system32>python deep_version.py
    theano: 1.0.1
    C:\Users\ggiri\AppData\Local\Continuum\anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
    from ._conv import register_converters as _register_converters
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.1.5

  230. Avatar
    Gopinaath Ragavan March 28, 2018 at 4:07 pm #

    Theano Runtime Error – console output below:

    >>> import tensorflow
    C:\ProgramData\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
    from ._conv import register_converters as _register_converters
    >>> print(tensorflow.__version__
    … )
    1.5.0
    >>> print(theano.__version__
    … )
    Traceback (most recent call last):
    File “”, line 1, in
    NameError: name ‘theano’ is not defined
    >>> import keras
    Using TensorFlow backend.
    >>> print(keras.__version__)
    2.1.5
    >>> import theano
    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 1138, in _unify_values
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “C:\ProgramData\Anaconda3\lib\configparser.py”, line 1141, in _unify_values
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 328, in __get__
    delete_key=delete_key)
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “”, line 1, in
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
    check_mkl_openmp()
    File “C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.
    >>>

  231. Avatar
    Dave Bird March 29, 2018 at 3:05 pm #

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

  232. Avatar
    vishal March 31, 2018 at 5:41 pm #

    (base) C:\Users\vishu>cd code

    (base) C:\Users\vishu\code>python deep-versions.py
    Traceback (most recent call last):
    File “C:\Users\vishu\Anaconda3\lib\configparser.py”, line 1138, in _unify_values
    sectiondict = self._sections[section]
    KeyError: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configparser.py”, line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File “C:\Users\vishu\Anaconda3\lib\configparser.py”, line 781, in get
    d = self._unify_values(section, vars)
    File “C:\Users\vishu\Anaconda3\lib\configparser.py”, line 1141, in _unify_values
    raise NoSectionError(section)
    configparser.NoSectionError: No section: ‘blas’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configparser.py”, line 328, in __get__
    delete_key=delete_key)
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configparser.py”, line 172, in fetch_val_for_key
    raise KeyError(key)
    KeyError: ‘blas.ldflags’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep-versions.py”, line 2, in
    import theano
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
    check_mkl_openmp()
    File “C:\Users\vishu\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

    • Avatar
      Jason Brownlee April 1, 2018 at 5:45 am #

      Perhaps try setting the variable as suggestion in the error?

  233. Avatar
    Hasan Kiragi April 3, 2018 at 7:50 pm #

    theano: 0.9.0.dev-unknown-git
    tensorflow: 1.7.0
    keras: 2.1.5

  234. Avatar
    Fauzan Taufik April 4, 2018 at 3:09 am #

    I got this when checking deep_versions.py
    WARNING (theano.tensor.blas): Using Numpy C-API based implementation for BLAS functions.
    theano : 1.0.1

    what this mean?

    • Avatar
      Jason Brownlee April 4, 2018 at 6:18 am #

      I don’t know sorry. Perhaps try searching/posting on stackoverflow.

  235. Avatar
    Deepak Jha April 6, 2018 at 2:57 pm #

    Sir I am unable to update scikit learn library I tried as you instructed but it shows syntax error please resolve
    Thanks in anticipation

    • Avatar
      Jason Brownlee April 6, 2018 at 3:54 pm #

      I’m sorry to hear that, perhaps try posting on stackoverflow? I am not an expert at debugging workstations.

  236. Avatar
    Julio Chargoy April 6, 2018 at 4:02 pm #

    I got this versions after installation:

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

  237. Avatar
    khalfi April 8, 2018 at 4:38 pm #

    can i inatall tensorflow with win7 32 bit

    • Avatar
      Jason Brownlee April 9, 2018 at 6:07 am #

      I don’t know sorry. Perhaps try? Perhaps search or post stackoverflow?

  238. Avatar
    Prabowo April 9, 2018 at 2:15 pm #

    Thank you so much, Sir! Here are what I’ve got.

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.1.5

  239. Avatar
    rachit April 11, 2018 at 7:38 pm #

    import is not recognised as internal or external command

    • Avatar
      Jason Brownlee April 12, 2018 at 8:38 am #

      The code must be saved into a file with a .py extension and run as follows:

  240. Avatar
    AlgoP April 13, 2018 at 6:59 pm #

    scipy: 1.0.1
    numpy: 1.14.2
    matplotlib: 2.2.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

    A very nice tutorial.BTW do you know of any resources that I could read regarding convnets implementation in Machine Translation?. I have found one decent paper but it is rather too technical for me to get a grasp of it.I would like to use convnet rather than RNN for my project research, which is purely experimental hence not everything must work.

    • Avatar
      Jason Brownlee April 14, 2018 at 6:32 am #

      Well done!

      I have material on LSTMs for NMT (neural machine translation), but not CNNs, sorry. Try google scholar?

      • Avatar
        AlgoP April 14, 2018 at 7:12 am #

        Thanks Jason, Yes Google scholar has some info available but as the resources are rather limited I thought I will give it a go and ask.Thank you for the response and a very approachable tutorial.Keep up the good work!

        • Avatar
          Jason Brownlee April 15, 2018 at 6:14 am #

          Hang in there. Sometimes you have to go deep in google scholar. Maybe even ping some academics on related papers.

  241. Avatar
    Dave Bird April 14, 2018 at 7:29 am #

    Back at it.

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

  242. Avatar
    Lit April 17, 2018 at 9:00 pm #

    theano: 1.0.1
    /Users/litankumarmohanta/anaconda/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
    from ._conv import register_converters as _register_converters
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.1.5
    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

  243. Avatar
    AL April 26, 2018 at 2:01 am #

    Any chance you could do a similar post on how to make Ananconda Navigator work with GPU?
    I’m about ready to throw in the towel on this one…

    Thanks…….

  244. Avatar
    Dorin Manole April 26, 2018 at 10:30 pm #

    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1
    tensorflow: 1.5.1
    keras: 2.1.6

  245. Avatar
    liuhuan April 28, 2018 at 4:29 pm #

    scipy: 0.17.1
    numpy: 1.11.1
    matplotlib: 1.5.1
    pandas: 0.18.1
    statsmodels: 0.6.1
    sklearn: 0.17.1

  246. Avatar
    Erlina May 5, 2018 at 5:47 pm #

    Hi Jason,

    I have installed theano, tensorflow successfully in windows…

    However, when I run the deep_versions.py on spider, I got this message :

    runfile(‘E:/Machine Learning/deep_versions.py’, wdir=’E:/Machine Learning’)
    Traceback (most recent call last):

    File “”, line 1, in
    runfile(‘E:/Machine Learning/deep_versions.py’, wdir=’E:/Machine Learning’)

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

    File “C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py”, line 102, in execfile
    exec(compile(f.read(), filename, ‘exec’), namespace)

    File “E:/Machine Learning/deep_versions.py”, line 11, in
    import theano

    File “C:\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,

    File “C:\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt

    File “C:\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar

    File “C:\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas

    File “C:\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text

    File “C:\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:

    File “C:\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()

    File “C:\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
    check_mkl_openmp()

    File “C:\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
    raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)

    RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

    Would you please advice me how to solve the problem?

    Thank you..

    • Avatar
      Jason Brownlee May 6, 2018 at 6:26 am #

      I’m sorry to hear that, I have not seen this error. I think others in these comments have had this error and fixed it.

  247. Avatar
    Bill May 6, 2018 at 5:38 am #

    I ran into a nasty little ‘gotcha’ which might affect other newbies like me. When running the version checks above


    import pandas
    print('pandas: %s' % pandas.__version__)

    If the relevant module is NOT installed but you have a directory with the same name e.g. pandas, then it will raise the following exception which can be quite hard to fathom:


    AttributeError: 'module' object has no attribute '__version__'

    Took me a while to diagnose what was going on!

  248. Avatar
    Bill May 6, 2018 at 5:39 am #

    The only way to circumvent this that I can think of (other than not naming folders with module names) is this:


    # pandas
    try:
    import pandas
    print('pandas: %s' % pandas.__version__)
    except (import_exception, AttributeError):
    print('pandas: not installed')

    • Avatar
      Bill May 6, 2018 at 5:42 am #

      Sorry, code should be:


      # python = 3.6
      try:
      import pandas
      print('pandas: %s' % pandas.__version__)
      except (ModuleNotFoundError, AttributeError):
      print('pandas: not installed')

      depending on your Python version.

      • Avatar
        Jason Brownlee May 6, 2018 at 6:32 am #

        Thanks for sharing.

        Another gotcha is to never have filenames that match the name of a module or function that you are importing.

  249. Avatar
    Ayush Kumar May 11, 2018 at 8:07 pm #

    Hi Jason,

    I read about Enthought Canopy on another site, which also provides a development environment for Python.

    Is Enthought Canopy similar to Anaconda? Which one would you say is better choice for beginners?

    • Avatar
      Jason Brownlee May 12, 2018 at 6:29 am #

      I don’t know much about it sorry.