How to Setup Your Python Environment for Machine Learning with Anaconda

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

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

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

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

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

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,512 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.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.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?

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

    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.1.6
    theano: 1.0.1
    tensorflow: 1.8.0
    keras: 2.1.6

  251. Avatar
    Luciana May 14, 2018 at 8:50 am #

    Theano didn’t work in windows 10, several errors.
    But thensorflow and keras all ok:
    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.1.5

  252. Avatar
    Vibhu May 14, 2018 at 11:22 pm #

    This is the first 4 lines of a pageful of error that I got :

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

    • Avatar
      Jason Brownlee May 15, 2018 at 7:56 am #

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

  253. Avatar
    Jonathan May 15, 2018 at 1:38 am #

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

  254. Avatar
    Peter May 15, 2018 at 10:52 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

    theano: 1.0.1
    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.1.6

    Windows 7 64-bit, Python 3.6.4,

    To remove warning:

    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.

    I updated h5py from 2.7.8 to 2.8.0rc1, using:

    pip install h5py==2.8.0rc1

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

      Very nice!

      • Avatar
        Peter May 21, 2018 at 12:57 am #

        Thanks for your tutorials, they are incredibly well written and useful!

  255. Avatar
    Tebogo May 17, 2018 at 2:20 am #

    theano: 1.0.1
    tensorflow: 1.8.0
    keras: 2.1.6
    Using TensorFlow backend.

  256. Avatar
    Jozr May 24, 2018 at 1:05 am #

    te$ more deep_versions.py
    # theano
    import theano
    print(‘theano: %s’ % theano.__version__)
    # tensorflow
    import tensorflow
    print(‘tensorflow: %s’ % tensorflow.__version__)
    # keras
    import keras
    print(‘keras: %s’ % keras.__version__)

    te$ python deep_versions.py
    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/scan_module/__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/tensor/__init__.py”, line 17, in
    from theano.tensor import blas
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/tensor/blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/tensor/blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/configparser.py”, line 332, in __get__
    val_str = self.default()
    File “/home/john/anaconda2/lib/python2.7/site-packages/theano/configdefaults.py”, line 1408, in default_blas_ldflags
    check_mkl_openmp()
    File “/home/john/anaconda2/lib/python2.7/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 May 24, 2018 at 8:15 am #

      Perhaps check on stackoverflow?

    • Avatar
      Zabell June 1, 2018 at 5:32 am #

      you can solve this with either the following:

      conda install mkl=2017

      *or*

      conda install mkl=2018

      Depending on the error message

  257. Avatar
    Kundan May 25, 2018 at 3:34 am #

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

  258. Avatar
    Alam May 26, 2018 at 10:25 pm #

    here is mine:

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

  259. Avatar
    V.Sainath May 28, 2018 at 8:30 pm #

    Jason i need algorithm for a program where user does an action which is suggested by AI 5 times and then premium suggestion is suggested based on the reward points and again program is looped with 5 suggestions
    it may be any action in the world
    plz help me.

  260. Avatar
    Bento Silva May 29, 2018 at 5:10 am #

    Great tutoria!

    My results:

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

  261. Avatar
    Ritzi Mittal June 2, 2018 at 7:40 pm #

    Hi,
    I have 32-bit dell laptop with 500mb hard disk. Can I install Anaconda on my PC?
    how will be my pc functioning after it?
    Is there any online tool I can use for this purpose?

  262. Avatar
    Crosby Tosh June 5, 2018 at 7:00 am #

    Here is my output:

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  263. Avatar
    Ahmed June 6, 2018 at 9:38 am #

    First of all, thanks for the great help
    I followed all steps correctly, but i faced the following error message during installing keras

    distributed 1.21.8 requires msgpack, which is not installed
    grin 1.2.1 requires argparse>=1.1, which is not installed

    thanks again

    • Avatar
      Jason Brownlee June 6, 2018 at 2:00 pm #

      Perhaps you can ignore these message and use the libraries directly?

    • Avatar
      Niki June 26, 2018 at 2:27 pm #

      you can install them using pip, e.g.:

      pip install msgpack

  264. Avatar
    abbas June 7, 2018 at 7:55 pm #

    hi jason!
    i am trying to setup my machine learning envirement but my tensorflow is coming up with the following error.how to fix it!!!

    ImportError Traceback (most recent call last)
    ~\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()

    • Avatar
      Jason Brownlee June 8, 2018 at 6:09 am #

      I’m sorry to hear that, perhaps try searching/posting your error on stackoverfolow?

  265. Avatar
    Priyanka June 24, 2018 at 6:42 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  266. Avatar
    Don Larson June 25, 2018 at 4:49 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  267. Avatar
    Zor June 25, 2018 at 11:16 am #

    Anaconda 5.2 para el instalador de Linux (en mi caso Ubuntu 16.04)

    Buenas!
    Tengo el sgte. problema, me descargue la ultima versión de Anaconda (5.2 Linux) y cuenta con:

    tensorboard 1.8.0
    tensorflow 1.1.0
    bleach = 2.1.3

    Pero esta versión tensorboard precisa un bleach 1.5.0

    envio error de mensaje:
    tensorboard 1.8.0 has requirement bleach==1.5.0, but you’ll have bleach 2.1.3 which is incompatible

    ¿Alguno tuvo este problema y lo pudo solucionar?

    Sdos.

  268. Avatar
    Yul June 28, 2018 at 6:39 pm #

    Thank you!!! It worked really well

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  269. Avatar
    Rima June 28, 2018 at 8:18 pm #

    Thank you very much! this tutorial really helps me a lot!

  270. Avatar
    Srilatha June 28, 2018 at 9:22 pm #

    C:\Users\91966>python deep_versions.py
    C:\Users\91966\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 TensorFlow backend.
    Keras: 2.1.6
    Theano: 1.0.2
    Tensorflow: 1.8.0

  271. Avatar
    Archita Desai June 28, 2018 at 11:31 pm #

    Great tutorial!

  272. Avatar
    Tresor Koffi July 2, 2018 at 5:03 pm #

    C:\Users\TOSHIBA\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

    theano: 1.0.2
    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.2.0

  273. Avatar
    ningyuwhut July 3, 2018 at 11:21 pm #

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

  274. Avatar
    Christian Honey July 4, 2018 at 4:43 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  275. Avatar
    Christian Honey July 4, 2018 at 5:01 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1
    theano: 1.0.2
    /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
    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.2.0

  276. Avatar
    Juhi Mittal July 7, 2018 at 1:48 am #

    Really helpful..:)
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.0.2
    pandas: 0.20.3
    statsmodels: 0.8.0
    sklearn: 0.19.0
    theano: 1.0.2
    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.2.0

  277. Avatar
    Ericson Oliveira July 7, 2018 at 8:30 am #

    OS: Ubuntu MATE 18.04 LTS 64-bit

    versions.py output:
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

    deep_versions.py output:
    theano: 1.0.2
    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

    Thank you very much!

  278. Avatar
    Samvatsar July 8, 2018 at 4:35 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

  279. Avatar
    chweet July 10, 2018 at 12:42 am #

    Hi Dr. Jason

    Any idea how to fix this error:

    theano: 1.0.2
    Traceback (most recent call last):
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 14, in swig_import_helper
    return importlib.import_module(mname)
    File “C:\Users\cheew\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File “”, line 994, in _gcd_import
    File “”, line 971, in _find_and_load
    File “”, line 955, in _find_and_load_unlocked
    File “”, line 658, in _load_unlocked
    File “”, line 571, in module_from_spec
    File “”, line 922, in create_module
    File “”, line 219, in _call_with_frames_removed
    ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 17, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 16, in swig_import_helper
    return importlib.import_module(‘_pywrap_tensorflow_internal’)
    File “C:\Users\cheew\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named ‘_pywrap_tensorflow_internal’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import tensorflow
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 24, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 14, in swig_import_helper
    return importlib.import_module(mname)
    File “C:\Users\cheew\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File “”, line 994, in _gcd_import
    File “”, line 971, in _find_and_load
    File “”, line 955, in _find_and_load_unlocked
    File “”, line 658, in _load_unlocked
    File “”, line 571, in module_from_spec
    File “”, line 922, in create_module
    File “”, line 219, in _call_with_frames_removed
    ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 17, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\cheew\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 16, in swig_import_helper
    return importlib.import_module(‘_pywrap_tensorflow_internal’)
    File “C:\Users\cheew\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named ‘_pywrap_tensorflow_internal’

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/install_sources#common_installation_problems

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

  280. Avatar
    Amit Mukherjee July 16, 2018 at 5:01 pm #

    Output of versions.py

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  281. Avatar
    Amit Mukherjee July 16, 2018 at 5:02 pm #

    Output of deep_versions.py

    /opt/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

    tensorflow: 1.8.0
    Using TensorFlow backend.
    keras: 2.2.0

  282. Avatar
    Pradeep July 19, 2018 at 10:52 pm #

    I have just copy this code i gettin this error
    Warning (from warnings module):
    File “C:\ProgramData\Anaconda3\lib\site-packages\h5py\__init__.py”, line 36
    from ._conv import register_converters as _register_converters
    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.
    Traceback (most recent call last):
    File “C:/Users/hp/Desktop/pmlp.py”, line 2, in
    from keras.models import Sequential
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
    from .. import backend as K
    File “C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\__init__.py”, line 43, in
    assert _image_data_format in {‘channels_last’, ‘channels_first’}
    AssertionError

    I am using these libraries
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  283. Avatar
    Bill Fujimoto July 21, 2018 at 8:11 am #

    My outputs:
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    sklearn: 0.19.1

  284. Avatar
    Bill Fujimoto July 21, 2018 at 8:52 am #

    My output from deep_versions:

    Using TensorFlow backend.
    theano: 1.0.2
    tensorflow: 1.8.0
    keras: 2.2.0

  285. Avatar
    Bill Fujimoto July 21, 2018 at 10:15 am #

    I had Anaconda and Spyder IDE installed and seemingly working properly. After I did the Tensorflow install, one of the terminal messages said it was removing:
    anaconda: 5.2.0-py36_3

    I thought it was peculiar for doing so, but I proceeded anyway since I figured using conda to install it, it would know much better than I what it’s doing. I didn’t have a choice to reject that.

    Well, now the Anaconda Navigator and Spyder IDE no longer start up at all, so this apparently broke something. I attempted to reinstall anaconda by using: conda install anaconda. It did so but with a custom version it said. The navigator and Spyder are still non functional.

    I’m tempted to uninstall Anaconda using the win uninstall to start from scratch, but since this will uninstall python as well, I’m guessing it will uninstall all the add on packages I just went thru here. Installing Anaconda fresh along with the tensorflow et al. packages seems like it will just result in an infinite loop.

    Any idea on how to get Spyder working? Is it just missing hook or something?
    thanks.

  286. Avatar
    FritzDe July 21, 2018 at 6:57 pm #

    anaconda and python is installed on win8.1, but scipy: no module

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

      That is very odd.

      Perhaps you have 2 versions installed somehow?

  287. Avatar
    PRAVEEN KUMAR July 25, 2018 at 4:28 am #

    tensorflow: 1.9.0
    Using TensorFlow backend.
    keras: 2.2.0

  288. Avatar
    Ahmed July 28, 2018 at 6:45 pm #

    Hi Jason, I believe all good. this what I’ve got here.
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

    and then I got some weired thing I didn’t understand but I did some search and solve it.
    theano: 1.0.2
    Illegal instruction (core dumped)

    to solve this I think that I have downgraded the tensorflow by doing this:.

    pip install tensorflow==1.5

    which give me this result

    theano: 1.0.2
    /home/ahmed/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
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.2.1

    so to solve this issue I think the downgraded something called by install the lowest version of it
    conda install h5py==2.8.0

    in the end I got the result that you we would like to have:
    theano: 1.0.2
    tensorflow: 1.5.0
    Using TensorFlow backend.
    keras: 2.2.1

    I hope these versions are good to keep going
    Thanks alot
    Ahmed

    • Avatar
      Jason Brownlee July 29, 2018 at 6:09 am #

      If you have TensorFlow, you can probably skip Theano.

  289. Avatar
    Natalie B. July 30, 2018 at 5:52 am #

    I have almost NO experience doing anything like this so… excellent directions! Very excited, thanks!

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1
    theano: 1.0.2
    tensorflow: 1.9.0
    keras: 2.2.2

  290. Avatar
    Kumar July 31, 2018 at 6:15 pm #

    Python 3.6 environment) C:\Users\i300251\Desktop\Services 2018\Certifications\machine Learning\Exercises>python dep_versions.py > deep_error.txt
    Traceback (most recent call last):
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\gof\lazylinker_c.py”, line 81, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\gof\lazylinker_c.py”, line 105, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “dep_versions.py”, line 2, in
    import theano
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\__init__.py”, line 110, in
    from theano.compile import (
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\compile\__init__.py”, line 12, in
    from theano.compile.mode import *
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\compile\mode.py”, line 11, in
    import theano.gof.vm
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\gof\vm.py”, line 674, in
    from . import lazylinker_c
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\gof\lazylinker_c.py”, line 140, in
    preargs=args)
    File “C:\Users\i300251\AppData\Local\Continuum\anaconda3\envs\Python 3.6 environment\lib\site-packages\theano\gof\cmodule.py”, line 2388, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    Exception: Compilation failed (return status=1): C:\Users\i300251\AppData\Local\Temp\ccOLb0tv.o: In function `_import_ar

    • Avatar
      Jason Brownlee August 1, 2018 at 7:40 am #

      Perhaps try skipping Theano and try TensorFlow instead?

  291. Avatar
    Lee Seonggu July 31, 2018 at 11:32 pm #

    Very nice!

  292. Avatar
    Antonio Kishore August 3, 2018 at 9:09 pm #

    scipy: 1.1.0
    numpy: 1.15.0
    matplotlib: 2.2.2
    pandas: 0.23.3
    statsmodels: 0.9.0
    sklearn: 0.19.1

    theano: 1.0.2
    tensorflow: 1.9.0
    Using TensorFlow backend.
    keras: 2.2.2

  293. Avatar
    Sean King August 5, 2018 at 5:14 am #

    scipy: 0.18.1
    numpy: 1.15.0
    matplotlib: 2.0.0
    pandas: 0.23.4
    statsmodels: 0.6.1
    sklearn: 0.18.1

  294. Avatar
    Shraddha August 6, 2018 at 5:38 pm #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  295. Avatar
    Taz August 14, 2018 at 4:12 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  296. Avatar
    Taz August 14, 2018 at 4:15 am #

    theano: 1.0.2
    /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
    tensorflow: 1.9.0
    Using TensorFlow backend.
    keras: 2.2.2

  297. Avatar
    Blair August 16, 2018 at 2:33 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

    tensorflow: 1.9.0
    Using TensorFlow backend.
    keras: 2.2.2

  298. Avatar
    Kamil Pietrasz August 16, 2018 at 6:29 am #

    theano: 1.0.2
    C:\ProgramData\Anaconda3\envs\tensorflow\lib\importlib\_bootstrap.py:222: Runtim
    eWarning: numpy.dtype size changed, may indicate binary incompatibility. Expecte
    d 96, got 88
    return f(*args, **kwds)
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

  299. Avatar
    Shwan August 21, 2018 at 9:15 am #

    Hi
    I am using a Mac and followed all the commands which all worked except one problem on Theano.

    I used the command ‘conda install theano’ and it worked.

    The console said :
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done

    After that, I check the version of Theano, it has some error messages:

    You can find the C code in this temporary file: /var/folders/w5/xtjn44ws6cs9yscf6hp7rzqm0000gn/T/theano_compilation_error_2il3f5wb
    —————————————————————————
    ImportError Traceback (most recent call last)
    ~/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py in ()
    80 version,
    —> 81 actual_version, force_compile, _need_reload))
    82 except ImportError:

    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    ImportError Traceback (most recent call last)
    ~/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py in ()
    104 version,
    –> 105 actual_version, force_compile, _need_reload))
    106 except ImportError:

    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Exception Traceback (most recent call last)
    in ()
    1 # theano
    —-> 2 import theano
    3 print(‘theano: %s’ % theano.__version__)

    ~/anaconda3/lib/python3.6/site-packages/theano/__init__.py in ()
    108 object2, utils)
    109
    –> 110 from theano.compile import (
    111 SymbolicInput, In,
    112 SymbolicOutput, Out,

    ~/anaconda3/lib/python3.6/site-packages/theano/compile/__init__.py in ()
    10 from theano.compile.function_module import *
    11
    —> 12 from theano.compile.mode import *
    13
    14 from theano.compile.io import *

    ~/anaconda3/lib/python3.6/site-packages/theano/compile/mode.py in ()
    9 import theano
    10 from theano import gof
    —> 11 import theano.gof.vm
    12 from theano import config
    13 from six import string_types

    ~/anaconda3/lib/python3.6/site-packages/theano/gof/vm.py in ()
    672 if not theano.config.cxx:
    673 raise theano.gof.cmodule.MissingGXX(‘lazylinker will not be imported if theano.config.cxx is not set.’)
    –> 674 from . import lazylinker_c
    675
    676 class CVM(lazylinker_c.CLazyLinker, VM):

    ~/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py in ()
    138 args = cmodule.GCC_compiler.compile_args()
    139 cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
    –> 140 preargs=args)
    141 # Save version into the __init__.py file.
    142 init_py = os.path.join(loc, ‘__init__.py’)

    ~/anaconda3/lib/python3.6/site-packages/theano/gof/cmodule.py in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
    2386 # difficult to read.
    2387 raise Exception(‘Compilation failed (return status=%s): %s’ %
    -> 2388 (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    2389 elif config.cmodule.compilation_warning and compile_stderr:
    2390 # Print errors just below the command line.

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

    1

    I have no idea about that. Could you help me?

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

      Ouch perhaps post to stackoverflow?

      Or just use TensorFlow instead?

  300. Avatar
    Dan August 22, 2018 at 1:19 pm #

    The Anaconda download was a script I had to first make an executable. Otherwise, a smooth install.

    $ python versions.py
    Python: 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
    [GCC 7.2.0]
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    sklearn: 0.19.1

    $ python deep_versions.py
    /home/puddle/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
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

  301. Avatar
    Ritu August 25, 2018 at 12:26 am #

    theano: 1.0.2
    tensorflow: 1.10.0
    keras: 2.2.2
    theano: 1.0.2
    tensorflow: 1.10.0
    keras: 2.2.2
    Using TensorFlow backend.

  302. Avatar
    Shruthi R August 25, 2018 at 6:23 pm #

    Thank you sir for helping with the guide
    I just worked with my first machine learning small project of iris flower
    .i had one doubt .how we can load our data.please can you tell me.

  303. Avatar
    iidean August 26, 2018 at 4:54 pm #

    Thank you for your post! I used Theano instead of Tensorflow following https://keras.io/backend/.

    theano: 1.0.2
    C:\ProgramData\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: C
    onversion 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.2.2

  304. Avatar
    Manny August 28, 2018 at 3:27 am #

    My Output after install:

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1
    tensorflow: 1.10.0
    keras: 2.2.2
    Using TensorFlow backend.

  305. Avatar
    Michael M August 29, 2018 at 1:20 am #

    Results from Germany:

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1
    theano: 1.0.2
    tensorflow: 1.10.0
    keras: 2.2.2

  306. Avatar
    Matthew Dixon September 1, 2018 at 1:03 pm #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  307. Avatar
    Matthew Dixon September 1, 2018 at 1:06 pm #

    >conda update scikit-learn
    Solving environment: done

    # All requested packages already installed.

    (base) D:\OneDrive\Everything\Matt\Software Development\MachineLearning>python versions.py
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  308. Avatar
    Matthew Dixon September 1, 2018 at 2:30 pm #

    >python deep_version.py
    theano: 1.0.2
    [REDACTED]\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.10.0
    Using TensorFlow backend.
    keras: 2.2.2

  309. Avatar
    feng3245 September 4, 2018 at 1:36 am #

    theano: 1.0.2
    tensorflow: 1.4.0
    keras: 2.2.2

    All installed using pip3 instead of conda.

  310. Avatar
    Ali Reza ALAEI September 4, 2018 at 3:59 am #

    Thanks Jason for your wonderful tutorial and website!

    I have installed Python 3.7, but could not get installed TensorFlow and Keras.
    Have you nay idea to solve this problem?
    Thank you very much!

    • Avatar
      Jason Brownlee September 4, 2018 at 6:11 am #

      Sorry to hear that, did the above tutorial help?

      • Avatar
        Ali Reza ALAEI September 4, 2018 at 1:38 pm #

        I followed exactly the tutorial and could install every things. However, when I used import to verify the installation of TensorFlow and Keras, I received the following errors.

        >>> import tensorflow
        Traceback (most recent call last):
        File “”, line 1, in
        import tensorflow
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\__init__.py”, line 22, in
        from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
        from tensorflow.python import pywrap_tensorflow
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
        from tensorflow.python.pywrap_tensorflow_internal import *
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 114
        def TFE_ContextOptionsSetAsync(arg1, async):
        ^
        SyntaxError: invalid syntax
        >>> import keras
        Using TensorFlow backend.
        Traceback (most recent call last):
        File “”, line 1, in
        import keras
        File “C:\Programs\Python\Python37-32\lib\site-packages\keras\__init__.py”, line 3, in
        from . import utils
        File “C:\Programs\Python\Python37-32\lib\site-packages\keras\utils\__init__.py”, line 6, in
        from . import conv_utils
        File “C:\Programs\Python\Python37-32\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
        from .. import backend as K
        File “C:\Programs\Python\Python37-32\lib\site-packages\keras\backend\__init__.py”, line 89, in
        from .tensorflow_backend import *
        File “C:\Programs\Python\Python37-32\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
        import tensorflow as tf
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\__init__.py”, line 22, in
        from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
        from tensorflow.python import pywrap_tensorflow
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
        from tensorflow.python.pywrap_tensorflow_internal import *
        File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 114
        def TFE_ContextOptionsSetAsync(arg1, async):
        ^
        SyntaxError: invalid syntax
        >>>

        • Avatar
          Jason Brownlee September 4, 2018 at 1:54 pm #

          Copy the code into a new file named versions.py and run it from the command line as: python versions.py

  311. Avatar
    Ali Reza ALAEI September 4, 2018 at 4:07 pm #

    Thank you Jason for your kind reply.
    For the first part (versions.py) I get the following, which shows the installation is done perfectly for the those in the first part

    scipy: 1.1.0
    numpy: 1.14.5
    matplotlib: 2.2.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.2

    For the deep learning part (deep_versions.py) I get the following

    WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
    C:\Programs\Python\Python37-32\lib\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.2
    Traceback (most recent call last):
    File “C:\Programs\Python\Python37-32\myproj\learn\deep_versions.py”, line 5, in
    import tensorflow
    File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\__init__.py”, line 22, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
    File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 114
    def TFE_ContextOptionsSetAsync(arg1, async):
    ^
    SyntaxError: invalid syntax

    • Avatar
      Jason Brownlee September 5, 2018 at 6:27 am #

      Ouch, perhaps post to stackoverflow?

      Or perhaps just use Theano for now?

  312. Avatar
    Jay Zoo September 5, 2018 at 1:05 pm #

    Typed python versions.py it tells me ModuleNotFoundError:No module named ‘scipy’

    I tried to do it manually by typing it directly into the terminal, worked for scipy (1.1.0) and numpy (1.15.1) but got ModuleNotFoundError:No module named ‘matplotlib’

    Complete beginner here btw..
    Thanks for help!

    • Avatar
      Jason Brownlee September 5, 2018 at 2:41 pm #

      Sounds like you might not have all of the elements installed?

  313. Avatar
    leila hm September 8, 2018 at 12:35 am #

    lors de l’exécution du fichier deep_versions.py j’ai le msg suivant:
    theano: 1.0.2
    Traceback (most recent call last):
    File “C:\Users\asus\Anaconda3\lib\site-packages\tensorflow\python\platform\self_check.py”, line 62, in preload_check
    ctypes.WinDLL(build_info.nvcuda_dll_name)
    File “C:\Users\asus\Anaconda3\lib\ctypes\__init__.py”, line 348, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] Le module spécifié est introuvable

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “versions.py”, line 5, in
    import tensorflow
    File “C:\Users\asus\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 22, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
    File “C:\Users\asus\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Users\asus\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 30, in
    self_check.preload_check()
    File “C:\Users\asus\Anaconda3\lib\site-packages\tensorflow\python\platform\self_check.py”, line 70, in preload_check
    % build_info.nvcuda_dll_name)
    ImportError: Could not find ‘nvcuda.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in ‘C:\Windows\System32’. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed.

    • Avatar
      Jason Brownlee September 8, 2018 at 6:09 am #

      Perhaps use Theano instead?
      Perhaps post to stackoverflow?

  314. Avatar
    Tom Woodward September 11, 2018 at 3:36 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  315. Avatar
    Chidi Udekwe September 12, 2018 at 4:24 pm #

    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.8.0
    sklearn: 0.19.0

  316. Avatar
    Hal Stein September 13, 2018 at 10:28 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  317. Avatar
    Patricia Irene Palacio September 14, 2018 at 2:21 am #

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

  318. Avatar
    Thanh Le September 16, 2018 at 2:33 am #

    This is my version of python’s library:

    D:/Program/python.exe “d:/Study code/Deeplearningmodel/Day1/versions.py”
    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

    and Deep_version:
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

    Thank you for your tutorial!!
    this is what i really need right now!

  319. Avatar
    Jarek September 18, 2018 at 7:07 am #

    Hi Jason,

    My version of python library is:

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

    theano: 1.0.2
    tensorflow: 1.10.0
    keras: 2.2.2

    Thank you very much.

  320. Avatar
    Therin September 24, 2018 at 11:25 am #

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

    File “C:\Users\theri\Anaconda2\lib\site-packages\theano\tensor\__init__.py”, line 15, in
    from theano.tensor import opt

    ImportError: cannot import name opt

  321. Avatar
    Azharo September 27, 2018 at 6:59 pm #

    Thanks Jason for your wonderful tutorial and website!

    This is my version of python’s library:

    (base) C:\Users\Star>python versions.py
    scipy: 1.0.0
    numpy: 1.14.0
    matplotlib: 2.1.2
    pandas: 0.22.0
    statsmodels: 0.8.0
    sklearn: 0.19.1

    Thank you very much!

  322. Avatar
    Elias September 28, 2018 at 1:14 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    statsmodels: 0.9.0
    sklearn: 0.19.1

  323. Avatar
    Buvana October 3, 2018 at 11:48 pm #

    Thanks for writing out this guide Jason.

    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 3.0.0
    pandas: 0.23.4
    sklearn: 0.20.0

    theano: 1.0.3
    tensorflow: 1.10.0
    keras: 2.2.2

  324. Avatar
    Imtiyaz October 4, 2018 at 4:25 am #

    Python: 3.6.5 |Anaconda custom (64-bit)| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
    scipy: 0.19.1
    numpy: 1.13.3
    matplotlib: 2.2.2
    pandas: 0.23.0
    sklearn: 0.18.1

    theano: 1.0.3
    tensorflow: 1.10.0
    Traceback (most recent call last):
    File “d:\Python\Learning\python_deep_versions.py”, line 8, in
    import keras
    ModuleNotFoundError: No module named ‘keras’

    • Avatar
      Jason Brownlee October 4, 2018 at 6:21 am #

      Looks like Keras is not installed.

      • Avatar
        Imtiyaz October 5, 2018 at 12:50 am #

        When first time i tried “pip install keras” I got below error.

        ERROR: You must give at least one requirement to install (see “pip help install”)
        You are using pip version 10.0.1, however version 18.0 is available.
        You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.

        after pip upgrade when I tried “pip install keras” I got

        Requirement already satisfied: keras in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (2.2.3)
        Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (1.0.5)
        Requirement already satisfied: numpy>=1.9.1 in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (1.15.2)
        Requirement already satisfied: scipy>=0.14 in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (1.1.0)
        Requirement already satisfied: keras-applications>=1.0.6 in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (1.0.6)
        Requirement already satisfied: pyyaml in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (3.13)
        Requirement already satisfied: six>=1.9.0 in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (1.11.0)
        Requirement already satisfied: h5py in c:\users\imtiyaz\appdata\local\programs\python\python37-32\lib\site-packages (from keras) (2.8.0)

  325. Avatar
    Imtiyaz October 5, 2018 at 1:02 am #

    I did “conda install keras” and it is fine now.

    theano: 1.0.3
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

  326. Avatar
    Tom October 6, 2018 at 3:23 am #

    Thank you Jason,

    Your script above saved me a tremendous amount of time. You are awesome and thanks again!

    (My best known method:
    I tried Python 3.7 but found many files version issues, so don’t use Python 3.7. I installed again Python 3.6.6 and it went a lot smoother)

    theano 1.0.3
    tensorflow 1.10.0
    Using TensorFlow backend
    keras: 2.2.4

    scipy: 1.1.0
    numpy: 1.15.1
    metplotlib: 2.2.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.0
    conda: 4.5.11
    Python: 3.6.6

  327. Avatar
    Sorin Stan October 9, 2018 at 1:23 am #

    I got this versions, i hope this guide is still good for this time! 😀
    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.2

  328. Avatar
    AM October 18, 2018 at 4:36 am #

    scipy: 1.1.0
    numpy: 1.14.3
    matplotlib: 2.2.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.1

  329. Avatar
    Sal October 23, 2018 at 5:35 am #

    I cannot get anything to import. When I submit the first step in the IDLE portion I get this error message: ModuleNotFoundError: No module named ‘scipy’

    What am I doing wrong?

    Thanks

  330. Avatar
    santhosh October 24, 2018 at 12:27 am #

    Followed u r instructions in book on AWS ec2 machine

    sudo pip install –upgrade keras==2.1.3

    python -c “import keras; print(keras.__version__)”

    still keras is 1.2.2 .Pls suggest

    • Avatar
      Jason Brownlee October 24, 2018 at 6:30 am #

      Perhaps the upgrade failed?

      • Avatar
        santhosh October 24, 2018 at 12:59 pm #

        logs for this ….

        sudo pip install –upgrade keras==2.1.3

        requirement already up-to-date: keras 2.1.3 in /usr/local/lib64/python3.4\site-pacakages
        requirement already up-to-date: pyyam in /usr/local/lib64/python3.4\site-pacakages(from keras keras 2.1.3)
        requirement already up-to-date: numpy>=1.9.1 in /usr/local/lib64/python3.4\site-pacakages(from keras keras 2.1.3)
        requirement already up-to-date: scipy>=0.14 in /usr/local/lib64/python3.4\site-pacakages(from keras keras 2.1.3)
        requirement already up-to-date: six>=1.9.0 in /usr/local/lib64/python3.4\site-pacakages(from keras keras 2.1.3)
        you are using pip 9.0.1 ,however version 18.1 available
        you shouuld consider upgrading via the ‘pip install –upgrade pip’ command

        python -c “import keras; print(keras.__version__)” showing 1.2.2

        plz suggest

  331. Avatar
    Jonathan October 24, 2018 at 6:52 am #

    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.2

  332. Avatar
    Jonathan October 24, 2018 at 7:22 am #

    theano: 1.0.3
    Using Theano backend.
    keras: 2.2.4

  333. Avatar
    zubiar October 25, 2018 at 1:54 am #

    hello any one guide me how to install tensor flow

  334. Avatar
    Mike October 28, 2018 at 9:20 am #

    Jason, I already have an earlier version of Python installed. Will I have any conflicts by trying to install this version? Or should I install into a private virtual environment? If so, are there instructions for that?

    • Avatar
      Jason Brownlee October 29, 2018 at 5:49 am #

      Most examples do assume Python3.5 or higher, it might be best to use this version if possible.

  335. Avatar
    Gregory S October 29, 2018 at 10:41 am #

    Hello Jason,

    Thank you very much for your very helpful tutorials. I have installed Anaconda on my laptop, but I haven’t yet installed the TensorFlow deep learning library. I was wondering do you recommend installing TensorFlow with GPU support or sticking with CPU support? My laptop (Windows 8.1) has an i7 processor, 16 GB of memory and a NVIDIA CUDA-enabled GPU card.
    I would like to try to implement and evaluate a simple Convolutional Neural Network for MNIST as you have outlined in your tutorial “Handwritten Digit Recognition using Convolutional Neural Networks in Python with Keras”. Thank you in advance for your advice. Gregory

    • Avatar
      Jason Brownlee October 29, 2018 at 2:12 pm #

      You can run the tutorial on the CPU.

      I do recommend using your GPU, but I don’t have a tutorial on how to configure tensorflow for the GPU.

  336. Avatar
    zubair October 30, 2018 at 3:47 pm #

    hello sir i follow above step of deep learning but at last it give me error like
    conda-forge::Aautomat-0.7.0-py_1

    • Avatar
      Jason Brownlee October 31, 2018 at 6:21 am #

      Perhaps try searching/posting the error to stackoverflow?

  337. Avatar
    Dupai November 1, 2018 at 5:24 pm #

    python deep_versions.py
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.2
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

    Dear Jason Brownlee,
    Why am I getting this Warning?

  338. Avatar
    Tran November 5, 2018 at 1:19 am #

    Hello Jason,

    I have tried install tensorflow 3 times but still have the error as below. Please help me fix it. Thanks a lot.

    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: failed
    ERROR conda.core.link:_execute(502): An error occurred while installing package ‘conda-forge::automat-0.7.0-py_1’.
    CondaError: Cannot link a source that does not exist. C:\Users\NamTran\Anaconda3\Scripts\conda.exe
    Running conda clean --packages may resolve your problem.
    Attempting to roll back.

    Rolling back transaction: done

    CondaError: Cannot link a source that does not exist. C:\Users\NamTran\Anaconda3\Scripts\conda.exe
    Running conda clean --packages may resolve your problem.

    • Avatar
      Jason Brownlee November 5, 2018 at 6:17 am #

      Perhaps try posting your error to stackoverflow?

      Perhaps try using Theano instead?

      • Avatar
        Tran November 6, 2018 at 3:13 am #

        Thanks for your reply. I have already installed successful tensorflow by using pip. But when confirmed there still was an error. Can you help me?

        (venv) C:\Users\NamTran>python -c “import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))”
        2018-11-05 22:51:26.829773: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
        tf.Tensor(1152.4595, shape=(), dtype=float32)

        • Avatar
          Jason Brownlee November 6, 2018 at 6:34 am #

          You can ignore this warning.

          • Avatar
            Tran November 6, 2018 at 1:25 pm #

            Thanks

  339. Avatar
    Efi November 9, 2018 at 9:23 pm #

    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 2.2.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.2

  340. Avatar
    Bálint Horváth November 10, 2018 at 10:28 pm #

    Hello, I’m a complete noob with this, but I decided to start learning, and I wanted to set up a simple system to test my learning process.

    I followed your instructions and I got these:

    The first test:

    Environment Version
    scipy: 1.1.0
    numpy: 1.15.1
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.19.2

    after that I installed theano, keras and tensorflow but the test gave back this:

    (base) D:\Official\Scripts>python deep_vers_test.py
    theano: 1.0.3
    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 18, in swig_import_helper
    fp, pathname, description = imp.find_module(‘_pywrap_tensorflow’, [dirname(__file__)])
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
    ImportError: No module named ‘_pywrap_tensorflow’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 54, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 28, in
    _pywrap_tensorflow = swig_import_helper()
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 20, in swig_import_helper
    import _pywrap_tensorflow
    ModuleNotFoundError: No module named ‘_pywrap_tensorflow’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_vers_test.py”, line 13, in
    import tensorflow
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 24, in
    from tensorflow.python import *
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 60, in
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 18, in swig_import_helper
    fp, pathname, description = imp.find_module(‘_pywrap_tensorflow’, [dirname(__file__)])
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
    ImportError: No module named ‘_pywrap_tensorflow’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 54, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 28, in
    _pywrap_tensorflow = swig_import_helper()
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 20, in swig_import_helper
    import _pywrap_tensorflow
    ModuleNotFoundError: No module named ‘_pywrap_tensorflow’

    Error importing tensorflow. Unless you are using bazel,
    you should not try to import tensorflow from its source directory;
    please exit the tensorflow source tree, and relaunch your python interpreter
    from there.

    Could you help me with this?

  341. Avatar
    pengG November 12, 2018 at 1:47 pm #

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

  342. Avatar
    Summer November 13, 2018 at 9:24 pm #

    scipy : 1.1.0
    numpy: 1.15.2
    matplotlib: 3.0.0
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.0
    tensorflow: 1.10.0
    keras: 2.2.4

  343. Avatar
    Robin November 20, 2018 at 12:32 am #

    Hi Jason

    Theano: 1.0.3
    Tensorflow: did not install properly (but I work on Windows so that’s not necessary, right?)
    Keras: when I try to print it says “NameError: name ‘keras’ is not defined”

    Is this a known issue?
    Also, do I need these packages to do the deep learning time series course you wrote?

    Thanks!

    • Avatar
      Jason Brownlee November 20, 2018 at 6:37 am #

      Looks like Keras might not be installed.

      Yes, you need (TensorFlow OR Theano), and you need Keras.

  344. Avatar
    Mark Hereld November 20, 2018 at 7:12 am #

    Not having much luck here…

    > python deep_versions.py

    You can find the C code in this temporary file: /var/folders/vr/d6wjt0916nb6l65d4q8mf5ch0000gn/T/theano_compilation_error_i9hkhevb
    Traceback (most recent call last):
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py”, line 81, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py”, line 105, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 2, in
    import theano
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/__init__.py”, line 110, in
    from theano.compile import (
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/compile/__init__.py”, line 12, in
    from theano.compile.mode import *
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/compile/mode.py”, line 11, in
    import theano.gof.vm
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/gof/vm.py”, line 674, in
    from . import lazylinker_c
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/gof/lazylinker_c.py”, line 140, in
    preargs=args)
    File “/Users/markhereld/anaconda3/lib/python3.6/site-packages/theano/gof/cmodule.py”, line 2391, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    Exception: Compilation failed (return status=1): In file included from /Users/markhereld/.theano/compiledir_Darwin-17.7.0-x86_64-i386-64bit-i386-3.6.6-64/lazylinker_ext/mod.cpp:1:. In file included from /Users/markhereld/anaconda3/include/python3.6m/Python.h:25:. /Users/markhereld/anaconda3/bin/../include/c++/v1/stdio.h:108:15: fatal error: ‘stdio.h’ file not found. #include_next . ^~~~~~~~~. 1 error generated..

  345. Avatar
    slayer November 21, 2018 at 10:47 pm #

    scipy:1.1.0
    numpy:1.15.1
    matplotlib:2.2.3
    pandas:0.23.4
    statsmodel:0.9.0
    scikit-learn:0.19.2

  346. Avatar
    Dani November 22, 2018 at 8:37 am #

    My five cents…

    For those using windows and getting this error:

    mod.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
    . #include

    when running:
    python deep_versions.py

    It may be the case that you have in your path the 32bit version of the gcc while using a 64bit theano. To fix this, make sure that your path is pointing to the 64bit version of the gcc (MinGW).

  347. Avatar
    kamal November 23, 2018 at 4:14 am #

    sir please tell me how i open command editor in anaconda prompt

  348. Avatar
    kamal November 23, 2018 at 4:15 am #

    as sir i have not installed python seprately

  349. Avatar
    Mohammad Anees Raza November 23, 2018 at 9:52 am #

    theano: 1.0.3
    tensorflow: 1.12.0
    keras: 2.2.4

  350. Avatar
    Harya Widiputra November 28, 2018 at 2:02 am #

    Running on Windows 10:

    C:\Users\X250\Desktop>python version.py
    scipy: 0.19.0
    numpy: 1.11.3
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.18.1

    C:\Users\X250\Desktop>python python_deep_learning_version.py
    theano: 1.0.3
    Using Theano backend.
    keras: 2.2.4

    managed to change keras backend from tensorflow to theano by adding this line:

    import os
    os.environ[‘KERAS_BACKEND’] = ‘theano’

    before importing keras

    thanks a lot for the super clear and helpful tutorial Jason, great job !!!

  351. Avatar
    Jose December 2, 2018 at 3:53 am #

    runfile(‘C:/Users/ivonnics/Versiones de los modulos de Deep Learning.py’, wdir=’C:/Users/ivonnics’)

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

    Jason: What`s the meaning of “Using TensorFlow backend.”?
    Thanks
    Jose

    • Avatar
      Jason Brownlee December 2, 2018 at 6:23 am #

      Well done!

      It suggests that Keras is using the TensorFlow mathematical library instead of Theano.

  352. Avatar
    Andrew Ross December 12, 2018 at 3:34 am #

    Hi Jason

    Things went well setting up Anaconda on my system until I tried getting the versions for theano and keras. I am using Windows so I did not try and get the tensorflow version.

    Here is my script

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

    And here is the response form Python when I run it

    (base) C:\Users\andre>python deep_versions.py
    theano: 1.0.3
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import keras
    File “C:\Users\andre\Anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils
    File “C:\Users\andre\Anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils
    File “C:\Users\andre\Anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
    from .. import backend as K
    File “C:\Users\andre\Anaconda3\lib\site-packages\keras\backend\__init__.py”, line 89, in
    from .tensorflow_backend import *
    File “C:\Users\andre\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    Is this OK?

    • Avatar
      Jason Brownlee December 12, 2018 at 5:56 am #

      Looks like tensorflow is not installed.

      Try commenting out the code checking the tensorflow version and change Keras to use Theano instead of tensorflow:
      https://keras.io/backend/

      • Avatar
        Andrew Ross February 5, 2019 at 7:06 am #

        Hi Jason

        That did the trick thanks

        Andrew

  353. Avatar
    andre December 13, 2018 at 9:52 am #

    Hello sir
    When i try to execute python version.py
    i got this error message
    the ordinal 241 could not be located in the dynamic link library (directory where i put python lib mkl_intel_thread.dll)

    help please

    • Avatar
      Jason Brownlee December 13, 2018 at 1:48 pm #

      It looks like there might be something wrong with your installation.

      Perhaps try reinstalling?
      Perhaps try searching/posting the error message on stackoverflow or Anaconda support?

      • Avatar
        andre December 13, 2018 at 9:42 pm #

        when I typed python -V
        the desired result is
        Python 3.5.2 :: Anaconda 4.2.0 (x86_64)
        while i got only
        Python 3.7.0

        is it a problem?

  354. Avatar
    Teja December 25, 2018 at 10:03 pm #

    theano: 1.0.3
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.2

  355. Avatar
    Adriano Machado December 27, 2018 at 9:29 am #

    😉

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

  356. Avatar
    Tosho Abdul December 28, 2018 at 7:02 am #

    theano: 1.0.3
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deep_versions.py”, line 8, in
    import keras
    File “C:\Users\Toshman\Anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils
    File “C:\Users\Toshman\Anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils
    File “C:\Users\Toshman\Anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
    from .. import backend as K
    File “C:\Users\Toshman\Anaconda3\lib\site-packages\keras\backend\__init__.py”, line 89, in
    from .tensorflow_backend import *
    File “C:\Users\Toshman\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

  357. Avatar
    Thomas Ruchatz December 30, 2018 at 6:36 am #

    Hi, I’m completely new to this but I really like your approach of walking us through the installation step by step. Thanks a lot!

    Currently tensorflow does not work with Python 3.7 (I got that and the reason from a python forum). What I did is downgrade to Python 3.6.

    Using the Anaconda command line window:
    $ conda create -n py36 python=3.6 anaconda

    …downloaded all the required files, Then I deactivated the current (py 3.7-) environment:
    $ conda deactivate

    …and activated the new (old) py 3.6 environment:
    conda activate py36
    …I can see that in the prompt and verified the version:
    $ python -V
    …It seems to be important to update scikit-learn:
    $ conda update scikit-learn
    …this updated some packages .

    …finally, I installed TensorFlow:
    $ conda install -c conda-forge tensorflow
    …some packages werde updated but others were downgraded

    Keras installed nicely into this environment.

  358. Avatar
    brian January 9, 2019 at 3:39 am #

    Hello Jason,

    Thanks for your very informative and deep articles on machinelearningmastery!
    I have a Q about setting up my (mac) machine for ML.
    So far, I’ve successfully set up everything to the point of installing tensorflow

    When I try this using “conda install -c conda-forge tensorflow”
    it just hangs at the “Solving environment” point and goes no further.

    Any idea why?
    As an alternative I tried using pip, but get the error message :
    “Could not find a version that satisfies the requirement tensorflow (from versions: )
    No matching distribution found for tensorflow”

    pip version is:
    pip 18.1 (python 3.7)

    ————–
    Any clues as to what is happening?

    Cheers B

  359. Avatar
    brian January 9, 2019 at 6:10 am #

    Hello again!

    Solution found to my last question – incompatible packages wrt the python version.
    I had python 3.7 initially, so downgraded to 3.6 and installed.

    No problems with the install but when I come to check the versions using the deep_versions.py script I get Illegal instruction: 4
    running that with python -v, the last 2 lines before that error message are:

    # code object from ‘/Users/brian/anaconda3/lib/python3.6/__pycache__/imp.cpython-36.pyc’
    import ‘imp’ #

    Any ideas what the problem here is?
    It fails when trying “import tensorflow”

    as I got theano: 1.0.3 successfully before the error message

    cheers b

  360. Avatar
    acontoli January 9, 2019 at 7:47 pm #

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

  361. Avatar
    Amber Umair January 22, 2019 at 7:38 am #

    Hi Jason, I followed all the steps but when installing theano i get following error:
    ERROR conda.core.link:_execute(507): An error occurred while installing package ‘None’.
    PermissionError(13, ‘Permission denied’)
    Attempting to roll back.

    Rolling back transaction: done

    PermissionError(13, ‘Permission denied’)
    PermissionError(13, ‘Access is denied’)

    • Avatar
      Jason Brownlee January 22, 2019 at 11:42 am #

      It looks like you do not have sufficient permission to install software on your workstation.

      Perhaps talk to your system admin?

  362. Avatar
    Syed Haseeb January 24, 2019 at 12:18 am #

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

  363. Avatar
    Nils February 2, 2019 at 1:13 am #

    Nice, thanks Jason.

    Recent versions:

    (base) C:\ml>python versions.py
    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

    (base) C:\ml>python deep-versions.py
    C:\Users\steinhei\AppData\Local\Continuum\anaconda3\lib\site-packages\h5py\__init__.py:72: UserWarning: h5py is running
    against HDF5 1.10.2 when it was built against 1.10.3, this may cause problems
    ‘{0}.{1}.{2}’.format(*version.hdf5_built_version_tuple)
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.4

    I skipped theano. The warning should not be an issue I guess.

  364. Avatar
    raya mannel February 2, 2019 at 4:39 pm #

    I justed started a Data Mining class online and I have to learn Python.

    I am trying to download all the software I need to do assignments for the class.
    (base) ~/desktop> python versions.py
    scipy: 1.2.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.24.0
    statsmodels: 0.9.0
    sklearn: 0.18.1
    (base) ~/desktop> python deep_versions.py
    python: can’t open file ‘deep_versions.py’: [Errno 2] No such file or directory
    (base) ~/desktop>

  365. Avatar
    JBC February 5, 2019 at 6:40 am #

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

    Hello From Rwanda Africa

  366. Avatar
    Tief February 6, 2019 at 6:05 am #

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

  367. Avatar
    HC Rochungnunga February 13, 2019 at 9:04 pm #

    theano: 1.0.3
    F:\Anaconda\lib\site-packages\h5py\__init__.py:72: UserWarning: h5py is running against HDF5 1.10.2 when it was built against 1.10.3, this may cause problems
    ‘{0}.{1}.{2}’.format(*version.hdf5_built_version_tuple)
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.4

  368. Avatar
    Anushree Goud February 14, 2019 at 3:47 pm #

    Hi Jason, I followed all the steps but when installing theano i get following error:
    import numpy as np
    import matplotlib
    import matplotlib.pyplot as plt
    import tensorflow as tf # Version 1.0.0
    from sklearn import metrics

    import os

    And here is the response form Python

    It is showing error
    ModuleNotFoundError Traceback (most recent call last)
    in
    4 import matplotlib
    5 import matplotlib.pyplot as plt
    —-> 6 import tensorflow as tf # Version 1.0.0 (some previous versions are used in past commits)
    7 from sklearn import metrics
    8

    ModuleNotFoundError: No module named ‘tensorflow’

    • Avatar
      Jason Brownlee February 15, 2019 at 7:58 am #

      You must comment out the import statement for tensorflow.

  369. Avatar
    Nakul February 15, 2019 at 11:27 pm #

    theano: 1.0.3
    tensorflow: 1.13.0-rc1
    Using TensorFlow backend.
    keras: 2.2.4

  370. Avatar
    Lindsay Moir February 16, 2019 at 1:45 pm #

    Versions
    scipy: 1.2.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.24.1
    statsmodels: 0.9.0
    sklearn: 0.20.2

    Deep Versions
    tensorflow: 1.12.0
    Using TensorFlow backend.
    keras: 2.2.4

  371. Avatar
    nnoel February 21, 2019 at 4:52 am #

    I’m working on windows 10 and I got:

    (base) C:\Users\nnoel\Documents\anaconda>python deep-versions.py
    theano: 1.0.4
    C:\Users\nnoel\Anaconda3\lib\site-packages\h5py\__init__.py:72: UserWarning: h5py is running against HDF5 1.10.2 when it was built against 1.10.3, this may cause problems
    ‘{0}.{1}.{2}’.format(*version.hdf5_built_version_tuple)
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.4

    Could this cause problems?

    • Avatar
      Jason Brownlee February 21, 2019 at 8:19 am #

      Well done!

      Looks like a warning, perhaps ignore for now.

      • Avatar
        nnoel February 22, 2019 at 1:22 am #

        things were solved after a “conda update –all”

        python versions.py
        scipy: 1.2.1
        numpy: 1.15.4
        matplotlib: 3.0.2
        pandas: 0.24.1
        statsmodels: 0.9.0
        sklearn: 0.20.2

        python deep-versions.py
        theano: 1.0.3
        tensorflow: 1.12.0
        Using TensorFlow backend.
        keras: 2.2.4

        one thing left :
        vcvarsall.bat”‘ is not recognized as an internal or external command,
        operable program or batch file.

  372. Avatar
    cloud white February 22, 2019 at 9:04 pm #

    perfect!!!

  373. Avatar
    Tejas B February 26, 2019 at 6:04 am #

    Hello Jason

    below are the verions i got after many permutaion of numpy and tensorflow version

    scipy: 1.2.1
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.21.0
    statsmodels: 0.9.0
    sklearn: 0.20.2

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

    but still beloz errors i received while running though IDLE

    _________________________________________________

    Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
    Type “copyright”, “credits” or “license()” for more information.
    >>>
    RESTART: C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\deep_versions.py
    Traceback (most recent call last):
    File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\deep_versions.py”, line 2, in
    import theano
    ModuleNotFoundError: No module named ‘theano’

    ______________________________________________

    RESTART: C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\ver.py
    Traceback (most recent call last):
    File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\ver.py”, line 1, in
    import pandas as pd
    ModuleNotFoundError: No module named ‘pandas’
    >>>
    ____________________________________________________

    Appreciate your response

  374. Avatar
    Victor Blay March 5, 2019 at 8:10 pm #

    theano: 1.0.3
    tensorflow: 1.12.0
    keras: 2.2.4

  375. Avatar
    Nate March 8, 2019 at 12:19 pm #

    How do i open text editor to run code instead of using the command line?

  376. Avatar
    James Culp March 11, 2019 at 10:04 am #

    Did not install TensorFlow, but getting error below

    theano: 1.0.3
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import keras
    File “C:\Users\james\Anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from . import utils
    File “C:\Users\james\Anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils
    File “C:\Users\james\Anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
    from .. import backend as K
    File “C:\Users\james\Anaconda3\lib\site-packages\keras\backend\__init__.py”, line 89, in
    from .tensorflow_backend import *
    File “C:\Users\james\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

  377. Avatar
    James Culp March 11, 2019 at 12:04 pm #

    After installing TensorFlow with pip, I get this error running version script

    (base) C:\Users\james>python keras_versions.py
    Using TensorFlow backend.
    ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’
    ImportError: numpy.core.multiarray failed to import

  378. Avatar
    James Culp March 11, 2019 at 10:44 pm #

    (base) C:\Users\james>python versions.py
    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

  379. Avatar
    James Culp March 12, 2019 at 1:41 am #

    After editing keras jSON file to theano backend

    (base) C:\Users\james>python deep_versions.py
    theano: 1.0.3
    Using Theano backend.
    keras: 2.2.4

  380. Avatar
    cahier March 19, 2019 at 12:50 pm #

    >python versions.py
    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

    >python deep_versions.py
    theano: 1.0.3
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.4

  381. Avatar
    Onur March 21, 2019 at 6:50 am #

    >python versions.py and python deep_versions.py

    SyntaxError: invalid syntax

    Saved the scrpits as text document to program location.

    • Avatar
      Jason Brownlee March 21, 2019 at 8:22 am #

      You must run then separately, one at a time from the command line, not from the Python interpreter.

      • Avatar
        Onur March 22, 2019 at 3:01 am #

        now it says,

        can’t find ‘__main__’ module in ‘versions.py’

        • Avatar
          Jason Brownlee March 22, 2019 at 8:31 am #

          That is odd, are you running from the command line:
          https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line

          • Avatar
            Onur March 22, 2019 at 9:05 am #

            Yes, I tried different command lines; cmd and anaconda-navigator(environments>base(root)>open terminal.
            I changed the directory to the text document i saved.
            Now it says “python: can’t open file ‘versions.py’: [Errno 2] No such file or directory”

          • Avatar
            Jason Brownlee March 22, 2019 at 2:31 pm #

            You will need to change directory to the location where you saved the file or move the file to your current working directory.

  382. Avatar
    Rajesh March 21, 2019 at 11:12 pm #

    how to extract all the xpath of the particular web page. is there any algorithm can we use to do that or is there BeautifulSoup will help to extract xpath ?.

    Please clarify.

    • Avatar
      Jason Brownlee March 22, 2019 at 8:29 am #

      Sounds like a programming question, I recommend posting it to stackoverflow.

  383. Avatar
    alan barry March 22, 2019 at 3:31 am #

    Hi Jason
    I have tried everything you said in your installation process of anaconda, etc, but every time I go to import files like Numpy, etc I get the same error reply – %1 python is not a valid Win32 application.
    Alan

  384. Avatar
    Maxime CAILAC March 27, 2019 at 1:20 am #

    $ python versions.py
    Python: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
    [GCC 7.3.0]
    scipy: 1.2.1
    numpy: 1.16.1
    matplotlib: 3.0.2
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    $ python deep_versions.py
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.4
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.4

  385. Avatar
    Anjali March 31, 2019 at 4:41 am #

    $ ./python version.py

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 2.2.4
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    $ ./python deep_version.py

    WARNING( theano.tensor.blas): UsingNumPy C-API based implementation for BLAS functions.
    theano: 1.0.4
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.4

  386. Avatar
    Alain April 7, 2019 at 4:53 am #

    C:\Users\alilu>python deep_version.py
    theano: 1.0.3
    tensorflow: 1.10.0
    Using TensorFlow backend.
    keras: 2.2.4

    C:\Users\alilu>

    • Avatar
      Jason Brownlee April 7, 2019 at 5:35 am #

      Well done.

      You might want to update to TensorFlow 1.13 if you can.

  387. Avatar
    yannick masua April 7, 2019 at 5:33 am #

    here is my output:

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    and for deep_version:

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

  388. Avatar
    Jamuna Prakash April 12, 2019 at 6:16 am #

    Hi Jason,

    Running versions.py got me this…

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    Am I good to go?

  389. Avatar
    jane April 12, 2019 at 1:08 pm #

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 2.1.2
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.0

  390. Avatar
    Chan Hong Goay April 12, 2019 at 6:02 pm #

    Dear Sir,

    I did the following things.

    pip uninstall tensorflow
    pip install tensorflow-gpu

    And I can’t manage to import tensorflow since then. Will install with conda then uninstall with pip cause errors?

    • Avatar
      Jason Brownlee April 13, 2019 at 6:24 am #

      I don’t know sorry.

      Perhaps try posting on stackoverflow?

  391. Avatar
    Andrea April 15, 2019 at 3:52 am #

    scipy: 1.2.0
    numpy: 1.15.4
    matplotlib: 3.0.2
    pandas: 0.24.0
    statsmodels: 0.9.0
    sklearn: 0.20.3

  392. Avatar
    Andrea April 15, 2019 at 4:00 am #

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

    One question:
    What do you think about the following message?

    <>

    Thank you for your work

  393. Avatar
    Deepa April 17, 2019 at 6:33 am #

    Python 3.7.3 (default, Mar 28 2019, 10:38:38) [MSC v.1915 32 bit (Intel)]
    Type “copyright”, “credits” or “license” for more information.

    IPython 7.4.0 — An enhanced Interactive Python.
    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  394. Avatar
    logan April 20, 2019 at 10:38 am #

    Python: 3.7.3 (default, Mar 27 2019, 16:54:48)
    [Clang 4.0.1 (tags/RELEASE_401/final)]
    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

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

    this is a working environment correct.

  395. Avatar
    Liam McKnight April 21, 2019 at 7:37 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

  396. Avatar
    Licky April 23, 2019 at 9:49 pm #

    scipy: 0.19.1
    numpy: 1.13.1
    matplotlib: 1.5.3
    pandas: 0.18.1
    statsmodels: 0.6.1
    sklearn: 0.19.0

  397. Avatar
    Licky April 24, 2019 at 1:38 am #

    theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
    tensorflow: 1.13.1
    keras: 2.2.4

  398. Avatar
    Rajkumar April 30, 2019 at 2:05 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3
    tensorflow: 1.13.1
    keras: 2.2.4

  399. Avatar
    Swamy May 4, 2019 at 9:06 pm #

    Thank you Dr. Jason 🙂

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    theano: 1.0.3
    tensorflow: 1.13.1

    Using TensorFlow backend.

    keras: 2.2.4

  400. Avatar
    sgrantcs May 6, 2019 at 1:40 am #

    Thank you!
    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3
    theano: 1.0.3
    tensorflow: 1.13.1
    keras: 2.2.4

  401. Avatar
    Stephan Infance May 10, 2019 at 4:11 pm #

    Hi Dr,
    I got this below mentioned versions. But I m very new to python and ML packages. So Initially I struggled to get output of versions. Later I identified I need to install all the packages ‘pip install’ command (using some google search).

    So my kind suggestion, please include those commands on the above tutorial. It will be very helpful for new bees like me. Thank you. Any how, You are rocking.

    scipy: 1.2.1
    numpy: 1.16.3
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.21.0

    • Avatar
      Jason Brownlee May 11, 2019 at 6:04 am #

      No need to install them as they all come with Anaconda.

  402. Avatar
    Roger May 12, 2019 at 12:33 am #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3
    theano: 1.0.3
    tensorflow: 2.0.0-alpha0
    Using Theano backend.
    keras: 2.2.4

  403. Avatar
    Roger May 12, 2019 at 8:24 pm #

    Not really so well done because this environment is no good. I had to downgrade numpy to 1.13.0 because the versions now being served up by Anaconda do not work together. Anyone following your tutorial will have the same problem. I probably would not have kept going had I not had success earlier with an Ubuntu machine and decided to get a new one with a GPU.

  404. Avatar
    Cristina May 15, 2019 at 9:41 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  405. Avatar
    Nour May 15, 2019 at 11:22 pm #

    C:\Windows\System32>python keras_first_network.py
    Traceback (most recent call last):
    File “keras_first_network.py”, line 86, in
    “execution_count”: null,
    NameError: name ‘null’ is not defined

    C:\Windows\System32>

    • Avatar
      Jason Brownlee May 16, 2019 at 6:33 am #

      Sorry, I have not seen this before, perhaps try searching/posting on stackoverflow?

  406. Avatar
    Javid May 18, 2019 at 4:25 am #

    Hi,

    theano: 1.0.3
    /Users/javid/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

    Can I skip this RuntimeWarning? And what does it mean?

    Thanks!

  407. Avatar
    Trisha May 24, 2019 at 2:48 am #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  408. Avatar
    Navin May 26, 2019 at 1:25 pm #

    Hello All,
    Would like share issue faced on Keras installation on AMd based processor….

    ‘Import Keras’ was failing due to underlying package which Keras uses, specifically the numpy library.
    On searching found that numpy 1.16 had to be installed, using the .whl file.

    Here is the command which did the trick and
    pip install “numpy-1.16.3+mkl-cp36-cp36m-win_amd64.whl”

    Now Import Keras is working ok, using TensorFlow as backend and have version 2.2.4

  409. Avatar
    MD SHAMIUL HAQUE May 27, 2019 at 10:26 am #

    NewMBP:python dr.sami$ python deep_versions.py
    theano: 1.0.3
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.4

  410. Avatar
    Helen Abell May 28, 2019 at 12:15 am #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  411. Avatar
    Helen Abell May 28, 2019 at 12:54 am #

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

  412. Avatar
    Tomy A June 4, 2019 at 7:28 am #

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

    Thank youso much

  413. Avatar
    Chidiebere June 5, 2019 at 11:11 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.21.2
    Theano : 1.0.3

    few errors

    >>> import tensorflow
    Traceback (most recent call last):
    File “”, line 1, in
    ModuleNotFoundError: No module named ‘tensorflow’
    >>> import keras
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “”, line 1, in
    File “/Users/ikechidieberesomadina/anaconda3/lib/python3.7/site-packages/keras/__init__.py”, line 3, in
    from . import utils
    File “/Users/ikechidieberesomadina/anaconda3/lib/python3.7/site-packages/keras/utils/__init__.py”, line 6, in
    from . import conv_utils
    File “/Users/ikechidieberesomadina/anaconda3/lib/python3.7/site-packages/keras/utils/conv_utils.py”, line 9, in
    from .. import backend as K
    File “/Users/ikechidieberesomadina/anaconda3/lib/python3.7/site-packages/keras/backend/__init__.py”, line 89, in
    from .tensorflow_backend import *
    File “/Users/ikechidieberesomadina/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’
    >>>

    • Avatar
      Jason Brownlee June 6, 2019 at 6:30 am #

      Well done!

      Te error suggests tensorflow is not installed.

  414. Avatar
    M Holderby June 14, 2019 at 12:05 am #

    To get scipy, I had to reinstall Anaconda as 32-bit but now cannot get tensorflow.

    scipy 1.2.1
    numpy 1.16.2
    matplotlib 3.0.3
    pandas 0.24.2
    statsmodels 0.9.0
    sklearn 0.20.3

    I would like to do an experiment for regression using tensorflow. Can I do that without scipy and statsmodel which objected as 64-bit but were okay with 32-bit Anaconda?
    Thanks in advance.

  415. Avatar
    ashish June 15, 2019 at 5:37 am #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3
    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  416. Avatar
    ttcc June 18, 2019 at 11:46 am #

    scipy: 1.2.1

    numpy: 1.16.2

    matplotlib: 3.0.3

    pandas: 0.24.2

    statsmodels: 0.9.0

    sklearn: 0.20.3

  417. Avatar
    Iuliia June 23, 2019 at 10:01 pm #

    theano: 1.0.3
    tensorflow: 1.13.1
    keras: 2.2.4

  418. Avatar
    Eric June 29, 2019 at 12:36 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

    • Avatar
      Jason Brownlee June 30, 2019 at 9:34 am #

      Well done!

      • Avatar
        Eric July 3, 2019 at 4:18 am #

        Thank you. I ran into setback bc had to figure out how to go to the directory (cd Desktop)
        and also versions.py didn’t run as is, tested versions.py.txt and that worked

  419. Avatar
    Suesarn Wilainuch July 2, 2019 at 9:26 am #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

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

    thank you so much, Jason
    Now I’m waiting for your new book. (GAN) 🙂

  420. Avatar
    Jeff July 5, 2019 at 12:01 am #

    Hi, Jason. Can we just update the libraries without specifying the versions, we can can just install the latest version?

    numpy
    matplotlib
    pandas
    statsmodels
    sklearn

    I have tried that on Linux using pip3 command to read the library from a separate text file like this: pip3 install -upgrade -r requirements.txt

  421. Avatar
    Juan Borque July 6, 2019 at 7:19 am #

    I keep getting the following errors when I run the text files:

    Step 3 number 5
    (base) C:\Users\Juan Borque>Anaconda versions.py
    usage: anaconda [-h] [–disable-ssl-warnings] [–show-traceback] [-v] [-q]
    [-V] [-t TOKEN] [-s SITE]

    anaconda: error: argument : invalid choice: ‘versions.py’ (choose from ‘auth’, ‘label’, ‘channel’, ‘config’, ‘copy’, ‘download’, ‘groups’, ‘login’, ‘logout’, ‘move’, ‘notebook’, ‘package’, ‘remove’, ‘search’, ‘show’, ‘upload’, ‘whoami’)

    Step 5 number 4
    (base) C:\Users\Juan Borque>Anaconda deep_versions.py
    usage: anaconda [-h] [–disable-ssl-warnings] [–show-traceback] [-v] [-q]
    [-V] [-t TOKEN] [-s SITE]

    anaconda: error: argument : invalid choice: ‘deep_versions.py’ (choose from ‘auth’, ‘label’, ‘channel’, ‘config’, ‘copy’, ‘download’, ‘groups’, ‘login’, ‘logout’, ‘move’, ‘notebook’, ‘package’, ‘remove’, ‘search’, ‘show’, ‘upload’, ‘whoami’)

  422. Avatar
    Samuel Ireke July 12, 2019 at 7:50 am #

    runfile(‘C:/Users/iui1/.spyder-py3/temp.py’, wdir=’C:/Users/iui1/.spyder-py3′)
    Reloaded modules: lazylinker_ext, lazylinker_ext.lazylinker_ext
    theano: 1.0.3
    tensorflow: 1.13.1
    keras: 2.2.4
    Python: 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
    scipy: 1.2.1
    numpy: 1.16.4
    matplotlib: 3.1.0
    pandas: 0.24.2
    sklearn: 0.21.1

  423. Avatar
    Amr July 14, 2019 at 6:36 am #

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

    • Avatar
      Amr July 14, 2019 at 6:37 am #

      scipy: 1.2.1
      numpy: 1.16.4
      matplotlib: 3.1.0
      pandas: 0.24.2
      statsmodels: 0.10.0
      sklearn: 0.21.2
      scipy: 1.2.1
      numpy: 1.16.4
      matplotlib: 3.1.0
      pandas: 0.24.2
      statsmodels: 0.10.0
      sklearn: 0.21.2

    • Avatar
      Jason Brownlee July 14, 2019 at 8:17 am #

      Well done!

  424. Avatar
    leilei July 15, 2019 at 7:06 pm #

    scipy: 1.2.1
    numpy: 1.16.4
    matplotlib: 3.1.0
    pandas: 0.24.2
    statsmodels: 0.10.0
    sklearn: 0.21.2

  425. Avatar
    Marilyn Singh July 16, 2019 at 10:02 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    Traceback (most recent call last):
    File “versions.py”, line 19, in
    print(‘sklearn: %s’ % sklearn.__version__)
    AttributeError: module ‘sklearn’ has no attribute ‘__version__’

    • Avatar
      Jason Brownlee July 17, 2019 at 8:24 am #

      Nice work.

      It looks like sklearn might not be installed correctly?

  426. Avatar
    Marilyn Singh July 16, 2019 at 10:37 pm #

    theano: 1.0.3
    tensorflow: 1.14.0
    Using Tensorflow backend
    keras: 2.2.4

  427. Avatar
    Marilyn Singh July 17, 2019 at 5:40 pm #

    When I check the packages using the ‘conda list’ command I get scikit-learn 0.20.3. It is installed there is just some confusion in my environment which I am trying to resolve.

    • Avatar
      Jason Brownlee July 18, 2019 at 8:21 am #

      There may be, e.g. differences between the command line and a notebook/IDE.

  428. Avatar
    Diego Cáceres July 19, 2019 at 5:35 pm #

    theano: 1.0.3
    tensorflow: 1.13.1
    keras: 2.2.4

  429. Avatar
    Femi July 25, 2019 at 7:00 pm #

    Sir, what are the steps in creating Machine learning environment in miniconda with python 2.7

    • Avatar
      Jason Brownlee July 26, 2019 at 8:17 am #

      Perhaps you can use the above process, but instead choose a version of anaconda for Python 2.7?

  430. Avatar
    Femi July 25, 2019 at 8:07 pm #

    What are the packages to install to get your samples done in backpropagation examples.

    • Avatar
      Jason Brownlee July 26, 2019 at 8:20 am #

      If you mean backprop from scratch tutorial, then just Python is required.

  431. Avatar
    Nasif Mahbub July 28, 2019 at 12:19 am #

    you have installed tensorflow directly. In many cases (in other sites/articles) it is suggested to install tensorflow in a virtual environment. what are the pros and cons of virtual environment and what are the pros and cons of your approach here?

    • Avatar
      Jason Brownlee July 28, 2019 at 6:48 am #

      Good question, isolation of the environment from other environments would be the pro of using an environment.

      It’s a personal choice.

  432. Avatar
    Nasif Mahbub July 29, 2019 at 12:52 am #

    If I create a different environment do I need to install deep libraries separately in that environment?

  433. Avatar
    Arnooow July 29, 2019 at 1:07 am #

    ************************************
    version.py
    ************************************
    scipy: 1.2.1
    numpy: 1.16.4
    matplotlib: 3.1.0
    pandas: 0.24.2
    statsmodels: 0.10.0
    sklearn: 0.21.2
    ************************************
    deep_version.py
    ************************************
    theano: 1.0.3
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.4

  434. Avatar
    Elsa July 29, 2019 at 2:33 pm #

    Thanks for the tutorials 🙂

    scipy: 1.2.1
    numpy: 1.16.4
    matplotlib: 3.1.0
    pandas: 0.24.2
    statsmodels: 0.10.0
    sklearn: 0.21.2
    theano: 1.0.3
    Using Theano backend.
    keras: 2.2.4

    • Avatar
      Jason Brownlee July 29, 2019 at 3:08 pm #

      Well done!

      • Avatar
        Elsa July 29, 2019 at 7:25 pm #

        Hi Jason, when i tried to run the Vanilla LSTM code in “How to Develop LSTM Models for Time Series Forecasting” , i got this in the last part of messages

        ……
        File “C:\Users\user\Anaconda3\lib\site-packages\theano\gof\cc.py”, line 1379, in cmodule_key_
        np.core.multiarray._get_ndarray_c_version())

        AttributeError: (‘The following error happened while compiling the node’, DotModulo(A, s, m, A2, s2, m2), ‘\n’, “module ‘numpy.core.multiarray’ has no attribute ‘_get_ndarray_c_version'”)

        May I know how to fix it?

  435. Avatar
    Syrine August 5, 2019 at 8:16 pm #

    Thank you for this tutorial

    scipy: 1.3.0
    numpy: 1.16.4
    matplotlib: 3.1.0
    pandas: 0.25.0
    statsmodels: 0.10.1
    sklearn: 0.21.2

    theano: 1.0.3
    tensorflow: 1.13.1
    keras: 2.2.4

  436. Avatar
    David August 8, 2019 at 10:55 pm #

    Thank you for this

  437. Avatar
    Viddi Mardiansyah August 16, 2019 at 8:53 pm #

    here is my output

    theano: 1.0.3
    Traceback (most recent call last):
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, descript
    ion)
    File “C:\Users\Mardiansyah\Anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\Users\Mardiansyah\Anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed: A dynamic link library (DLL) initialization routin
    e failed.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “f:\Deep-Versi.py”, line 5, in
    import tensorflow
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\__init__.py”
    , line 24, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-im
    port
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\__ini
    t__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow.py”, line 74, in
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\Mardiansyah\Anaconda3\lib\site-packages\tensorflow\python\pywra
    p_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, descript
    ion)
    File “C:\Users\Mardiansyah\Anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\Users\Mardiansyah\Anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed: A dynamic link library (DLL) initialization routin
    e failed.

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/errors

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

    Do I have a mistake while installing the tensorflow?

    Can you help me

    • Avatar
      Jason Brownlee August 17, 2019 at 5:39 am #

      Sorry to hear that.

      Perhaps try posting/searching on stackoverflow?

  438. Avatar
    Ayala August 31, 2019 at 7:35 pm #

    Hi Jason,

    This is what I got:

    ns.py
    scipy: 1.3.1
    numpy: 1.16.4
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.2

  439. Avatar
    Jug September 2, 2019 at 7:46 am #

    Hi Jason, Thanks so much

    scipy: 1.3.1
    numpy: 1.16.4
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.2
    theano: 1.0.3
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.5

  440. Avatar
    Tope Adeosun September 2, 2019 at 11:11 pm #

    Thanks, Jason for this post. Below is my output.

    scipy: 1.3.1
    numpy: 1.16.4
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.2
    theano: 1.0.3
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.2.4

  441. Avatar
    Sepideh September 4, 2019 at 11:45 pm #

    I received this message unfortunately:

    runfile(‘C:/Users/User/.spyder-py3/untitled0.py’, wdir=’C:/Users/User/.spyder-py3′)
    theano: 1.0.3
    Traceback (most recent call last):

    File “”, line 1, in
    runfile(‘C:/Users/User/.spyder-py3/untitled0.py’, wdir=’C:/Users/User/.spyder-py3′)

    File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
    execfile(filename, namespace)

    File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
    exec(compile(f.read(), filename, ‘exec’), namespace)

    File “C:/Users/User/.spyder-py3/untitled0.py”, line 12, in
    import tensorflow

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 24, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
    raise ImportError(msg)

    ImportError: Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed with error code -1073741795

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/errors

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

    runfile(‘C:/Users/User/.spyder-py3/untitled0.py’, wdir=’C:/Users/User/.spyder-py3′)
    Reloaded modules: lazylinker_ext, lazylinker_ext.lazylinker_ext
    theano: 1.0.3

    runfile(‘C:/Users/User/.spyder-py3/untitled1.py’, wdir=’C:/Users/User/.spyder-py3′)
    theano: 1.0.3
    Traceback (most recent call last):

    File “”, line 1, in
    runfile(‘C:/Users/User/.spyder-py3/untitled1.py’, wdir=’C:/Users/User/.spyder-py3′)

    File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
    execfile(filename, namespace)

    File “C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
    exec(compile(f.read(), filename, ‘exec’), namespace)

    File “C:/Users/User/.spyder-py3/untitled1.py”, line 12, in
    import tensorflow

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 24, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow

    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
    raise ImportError(msg)

    ImportError: Traceback (most recent call last):
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\ProgramData\Anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed with error code -1073741795

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/errors

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

  442. Avatar
    Basher September 16, 2019 at 6:20 pm #

    Would you help me to make a machine translation From Bangla to English Language.

  443. Avatar
    Basher September 16, 2019 at 7:23 pm #

    Please help me about keras set up

  444. Avatar
    Basher September 18, 2019 at 7:14 pm #

    how can I install theano, tensorflow and keras
    I found error:

    theano: 1.0.2
    Using TensorFlow backend.
    Traceback (most recent call last):

    File “”, line 1, in
    runfile(‘C:/Users/BASHER/.spyder-py3/version.py’, wdir=’C:/Users/BASHER/.spyder-py3′)

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

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

    File “C:/Users/BASHER/.spyder-py3/version.py”, line 5, in
    import keras

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

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\keras\utils\__init__.py”, line 6, in
    from . import conv_utils

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
    from .. import backend as K

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\keras\backend\__init__.py”, line 1, in
    from .load_backend import epsilon

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\keras\backend\load_backend.py”, line 89, in
    from .tensorflow_backend import *

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py”, line 5, in
    import tensorflow as tf

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\__init__.py”, line 22, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow

    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 74, in
    raise ImportError(msg)

    ImportError: Traceback (most recent call last):
    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 14, in swig_import_helper
    return importlib.import_module(mname)
    File “C:\Users\BASHER\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File “”, line 985, in _gcd_import
    File “”, line 968, in _find_and_load
    File “”, line 957, in _find_and_load_unlocked
    File “”, line 666, in _load_unlocked
    File “”, line 577, in module_from_spec
    File “”, line 938, in create_module
    File “”, line 222, in _call_with_frames_removed
    ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 17, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\BASHER\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 16, in swig_import_helper
    return importlib.import_module(‘_pywrap_tensorflow_internal’)
    File “C:\Users\BASHER\Anaconda3\lib\importlib\__init__.py”, line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ImportError: No module named ‘_pywrap_tensorflow_internal’

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/install_sources#common_installation_problems

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

    • Avatar
      Jason Brownlee September 19, 2019 at 5:55 am #

      It looks like there is a problem with your TensorFlow installation, but Theano is fine.

      Perhaps use Theano and Keras and leave TensorFlow for now?

  445. Avatar
    SInny September 19, 2019 at 9:46 pm #

    Hi Jason,

    I have a problem in the very beginning itself. Versions of conda and python are displayed for me only with anaconda prompt but not with command propmt or with terminal. when i proceed further with anaconda prompt the command conda update conda is getting failed. further when i try to import libraries it says ” import is not recognized as internal or external command”.

    Thanks in Advance

  446. Avatar
    tiffeny September 19, 2019 at 11:15 pm #

    I have a problem in the beginning itself because after installing, if i want to check if it works on the normal prompt it is showing that conda is not internal or external command where in Anaconda prompt i am able to see versions proceeding i am not able to do conda update conda which is failing and import is also been displayed as not internal or external command
    thank you

  447. Avatar
    Dave September 25, 2019 at 2:05 am #

    Hi Jason, on Windows 10 I installed theano and keras, then when I tried to check versions I got an error message from keras that it couldn’t find tensorflow, so I tried: just “conda install tensorflow” and it did.
    Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
    Type “help”, “copyright”, “credits” or “license” for more information.
    >>> import theano
    >>> print (‘theano: %s’ % theano.__version__)
    theano: 1.0.4
    >>> import tensorflow
    >>> print (‘tensorflow: %s’ % tensorflow.__version__)
    tensorflow: 1.14.0
    >>> import keras
    Using TensorFlow backend.
    >>> print(‘keras: %s’ % keras.__version__)
    keras: 2.3.0
    >>>

    I was interested to see,when I started the interpreter,
    [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
    At least some of it (hopefully the parts doing the computation) is 64 bit, but Anaconda is 32 bit.

    Thanks for this, I’ll have to try it on some of your tutorials now!

    • Avatar
      Jason Brownlee September 25, 2019 at 6:00 am #

      Looks good, you can ignore the warnings and other messages.

  448. Avatar
    Kirubagari September 25, 2019 at 2:24 am #

    theano: 1.0.4
    tensorflow: 1.14.0
    Using TensorFlow backend.
    keras: 2.3.0

  449. Avatar
    Diane Wagner October 9, 2019 at 3:13 pm #

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

    this is what I got

  450. Avatar
    Diane Wagner October 9, 2019 at 3:28 pm #

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

    This is what I’ve got

  451. Avatar
    RICKY October 13, 2019 at 1:39 am #

    Jason, I want to say thank you for placing such powerful tools at the disposal of newbies like myself with your excellent checklist tutorials. You are a true teacher doing a great job in passing on what you have worked so hard to learn. You embody what the Internet is all about.

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

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

    • Avatar
      Jason Brownlee October 13, 2019 at 8:31 am #

      Thanks.

      Well done on setting up your development environment!

  452. Avatar
    Md Shahjahan Ali October 23, 2019 at 2:38 pm #

    I am trying to install theano using command- (base) C:\Users\SHAHJAHAN> conda install theano.
    The packages were installed but at the end it is giving ERROR Message like this –
    Preparing transaction: done
    Verifying transaction: failed
    Environment Not Writable Error: The current user does not have write permissions to the target environment.
    environment location: C:\ProgramData\Anaconda3
    How can I solve this issue. Note that I am a beginner at Anaconda.

    • Avatar
      Jason Brownlee October 24, 2019 at 5:34 am #

      Looks like you do not have permission to install software on your own workstation?

  453. Avatar
    Md Shahjahan Ali October 23, 2019 at 3:05 pm #

    Problem Importing theano-

    I am running the following code- and getting the result.
    How can I solve this ?
    Thank you.

    • Avatar
      Md Shahjahan Ali October 23, 2019 at 3:07 pm #

      The code is this

      # 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 October 24, 2019 at 5:35 am #

      Perhaps try using tensorflow instead of theano if theano is giving you trouble?

  454. Avatar
    Kanaan October 28, 2019 at 10:58 pm #

    Thanks a lot Dr.Jason, previously I tried too much to set up Python Environment but every time faced many problems, now I have my own working Python development ..

  455. Avatar
    Habiba Hamid October 30, 2019 at 7:30 pm #

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.2
    statsmodels: 0.10.1
    sklearn: 0.21.3

  456. Avatar
    Steven Rigatti October 31, 2019 at 4:11 am #

    C:\Users\sjrig\Anaconda3>_conda -V
    conda 4.7.5

    C:\Users\sjrig\Anaconda3>python -V
    Python 3.7.4

    C:\Users\sjrig\Anaconda3>_conda update _conda

    NoBaseEnvironmentError: This conda installation has no default base environment. Use
    ‘conda create’ to create new environments and ‘conda activate’ to
    activate environments.

    I managed to get up to the point where you said to update the conda installation. I am on Windows 10.

    • Avatar
      Jason Brownlee October 31, 2019 at 5:36 am #

      Ouch, sorry, I have not seen this before.

      Perhaps try posting to stackoverflow or contact anaconda support?

      • Avatar
        Steven Rigatti October 31, 2019 at 11:28 pm #

        OK, I got it. Windows has lots of shell-type programs. There is the Command Prompt, PowerShell, etc. For the steps to work the user has to open “Anaconda Prompt”.

        scipy: 1.3.1
        numpy: 1.16.5
        matplotlib: 3.1.1
        pandas: 0.25.2
        statsmodels: 0.10.1
        sklearn: 0.21.3

        That worked. When I try to run the deep_versions.py file though, I get this warning:
        (base) C:\Users\sjrig\pyProgs\initialScripts>python deep_versions.py
        WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
        C:\Users\sjrig\Anaconda3\lib\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.4
        tensorflow: 2.0.0
        Using TensorFlow backend.
        keras: 2.3.1

  457. Avatar
    Telvin November 3, 2019 at 4:11 am #

    scipy: 1.3.1
    numpy: 1.17.2
    matplotlib: 3.1.1
    pandas: 0.25.2
    statsmodels: 0.10.1
    sklearn: 0.21.3

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

  458. Avatar
    Mario Giesel November 7, 2019 at 9:39 pm #

    Hi, Jason,

    a) I’m on Windows and did not install Tensorflow.

    b) deep_versions.py is

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

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

    c) I get
    ModuleNotFoundError: No module named ‘tensorflow’

    • Avatar
      Jason Brownlee November 8, 2019 at 6:40 am #

      Sorry to hear that.

      Perhaps try installing tensorflow again?

  459. Avatar
    sawsen November 10, 2019 at 6:33 pm #

    I want to make an an hybridization of a DL algorithm and ML one or may be two DL algorithm to solve Intrusion detection Problem. Any advice and What about features selection? How can identify the most pertinent attributes since in the dataset i use there are 41 features for every instance.

  460. Avatar
    sawsen November 12, 2019 at 7:34 pm #

    I mean shallow learning (traditional machine learning algorithm like SVM, KNN, DT,…)
    thank you or your answer.

    • Avatar
      Jason Brownlee November 13, 2019 at 5:39 am #

      Sorry, I don’t understand your question, can you elaborate please?

  461. Avatar
    Massa Ndong November 22, 2019 at 9:11 am #

    import theano

    ModuleNotFoundError: No module named ‘theano’

    • Avatar
      Jason Brownlee November 22, 2019 at 2:06 pm #

      The error suggests that theano is not installed.

  462. Avatar
    Abu Baker November 27, 2019 at 8:37 am #

    Here my what I got after installations:

    scipy: 1.3.1
    numpy: 1.17.3
    matplotlib: 3.1.1
    pandas: 0.25.3
    statsmodels: 0.10.1
    sklearn: 0.21.3

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

  463. Avatar
    Mireille November 29, 2019 at 12:33 am #

    Hello, Here is what I got after installations. Thank Jason, much appreciated.

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

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

  464. Avatar
    Vishnu November 29, 2019 at 10:43 am #

    scipy: 1.3.1
    numpy: 1.17.4
    matplotlib: 3.1.1
    pandas: 0.25.3
    statsmodels: 0.10.1
    sklearn: 0.21.3

  465. Avatar
    Vishnu November 29, 2019 at 10:59 am #

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

  466. Avatar
    Charan December 9, 2019 at 5:19 pm #

    theano: 1.0.4
    tensorflow: 2.0.0
    keras: 2.3.1

  467. Avatar
    MOHAMED December 11, 2019 at 8:45 pm #

    it’s help full. Thanks .

    i tried to install Spacy on my machine. i found error when i am trying to load my jupyter notebook ” ModuleNotFoundError: No module named ‘spacy’ ” i need help if some one can.

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

      Perhaps contact the spacy developer support? I don’t have tutorials on the topic.

  468. Avatar
    Prithviraj December 11, 2019 at 10:47 pm #

    WARNING (theano.configdefaults): install mkl with conda install mkl-service: No module named ‘mkl’
    theano: 1.0.4
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.3.1

  469. Avatar
    x December 14, 2019 at 7:03 am #

    Hello, Jason.
    Why can’t I found ‘statsmodels’ module? I just found as follow:
    scipy: 1.3.2
    numpy: 1.17.4
    matplotlib: 3.1.1
    pandas: 0.25.3
    sklearn: 0.21.3

    • Avatar
      Jason Brownlee December 15, 2019 at 5:58 am #

      Well done!

      You can check the version of statsmodels as follows:

  470. Avatar
    Dennis Donnelly December 15, 2019 at 4:52 pm #

    (base) C:\Users\denni>python versions.py
    scipy: 1.3.2
    numpy: 1.17.4
    matplotlib: 3.1.1
    pandas: 0.25.3
    statsmodels: 0.10.1
    sklearn: 0.21.3

  471. Avatar
    Dennis Donnelly December 15, 2019 at 5:13 pm #

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

  472. Avatar
    Dennis Donnelly December 15, 2019 at 5:16 pm #

    Thank you for this website! I never could have successfully done all this on my own, at least not in one sitting! Seriously, I think I would have just given up. This site is VERY well done.

    • Avatar
      Jason Brownlee December 16, 2019 at 6:12 am #

      Thanks for sharing your progress, and well done!

  473. Avatar
    shalini December 24, 2019 at 4:12 pm #

    i successfully install tensorflow in anaconda prompt and execute simple program. i am getting results where as i try to do this program in jupyter i am getting error ” Module notfound error: No module named tensorflow” and even i set path in anaconda. Please help me how to fix this error.

  474. Avatar
    Md.Touhidul Islam Koushik December 30, 2019 at 4:56 am #

    (base) C:\Users\ASUS-PC\Desktop>python Deep_versions.py theano: 1.0.4
    tensorflow: 2.0.0
    Using TensorFlow backend.
    keras: 2.3.1

  475. Avatar
    Habib Kedir December 30, 2019 at 12:08 pm #

    I have got this output. can I proceed?

    theano: 1.0.4

    Using TensorFlow backend.

    —————————————————————————
    ModuleNotFoundError Traceback (most recent call last)
    in
    3 print(‘theano: %s’ % theano.__version__)
    4 # keras
    —-> 5 import keras
    6 print(‘keras: %s’ % keras.__version__)

    ~\Anaconda3\lib\site-packages\keras\__init__.py in
    1 from __future__ import absolute_import
    2
    —-> 3 from . import utils
    4 from . import activations
    5 from . import applications

    ~\Anaconda3\lib\site-packages\keras\utils\__init__.py in
    4 from . import data_utils
    5 from . import io_utils
    —-> 6 from . import conv_utils
    7 from . import losses_utils
    8 from . import metrics_utils

    ~\Anaconda3\lib\site-packages\keras\utils\conv_utils.py in
    7 from six.moves import range
    8 import numpy as np
    —-> 9 from .. import backend as K
    10
    11

    ~\Anaconda3\lib\site-packages\keras\backend\__init__.py in
    —-> 1 from .load_backend import epsilon
    2 from .load_backend import set_epsilon
    3 from .load_backend import floatx
    4 from .load_backend import set_floatx
    5 from .load_backend import cast_to_floatx

    ~\Anaconda3\lib\site-packages\keras\backend\load_backend.py in
    88 elif _BACKEND == ‘tensorflow’:
    89 sys.stderr.write(‘Using TensorFlow backend.\n’)
    —> 90 from .tensorflow_backend import *
    91 else:
    92 # Try and load external backend.

    ~\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py in
    3 from __future__ import print_function
    4
    —-> 5 import tensorflow as tf
    6 from tensorflow.python.eager import context
    7 from tensorflow.python.framework import device as tfdev

    ModuleNotFoundError: No module named ‘tensorflow’

    • Avatar
      Jason Brownlee December 31, 2019 at 7:25 am #

      The error suggests you do not have tensorflow installed.

      You can install tensorflow or change keras to use the theano backend.

  476. Avatar
    Mitch January 3, 2020 at 9:23 am #

    #versions.py
    scipy: 1.3.1
    numpy: 1.17.2
    matplotlib: 3.1.1
    seaborn: 0.9.0
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

    #deep_versions.py
    tensorflow: 1.14.0
    Using TensorFlow backend.
    keras: 2.2.4

    I’m using OSX Catalina and getting ready to start advanced learning on NLP and CV. Should I force the use of TF2.0?

    • Avatar
      Jason Brownlee January 4, 2020 at 8:14 am #

      Nice work.

      No, these versions are fine for now. You can push to Keras 2.3 and TF 2 if you want, bit it won’t make a difference for 99% of code.

  477. Avatar
    Beatrice van Eden January 6, 2020 at 6:39 pm #

    scipy: 1.3.1
    numpy: 1.17.2
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

  478. Avatar
    JG January 13, 2020 at 4:04 am #

    Hi Jason,

    1) I have already installed PYTHON (3.6) environment on my new Macpro with Catalina, following your tutorial :
    https://machinelearningmastery.com/install-python-3-environment-mac-os-x-machine-learning-deep-learning/

    using Macports manager packages for my mac, but taking care on libraries dependencies.
    It is OK everything upt to now! thanks.

    2) But I always was considering installing PYTHON through ANACONDA (that takes care of dependencies) and also the latest version up to date (e.g. for the time being 3.7 version) …

    But on the other hand and due to KERAS compatibility I only can install Python 3.6, according to keras instructions…

    My question is:

    Because new TensorFlow wrapper on Keras, this own tutorial, e.g. ‘tf.keras’, it is more recommended, convenient, integrated and maintained by new tensorflow 2.0, than Keras alone,
    if I decide to install Python 3.7 (or superior) may I still be compatible with keras?, now being possible through the new API Tensorflow.Keras ..or still 3.6 Python compatibility version is still required by new ‘tf.keras’?

    Thanks and regards,
    JG

  479. Avatar
    JG January 13, 2020 at 9:49 pm #

    Great Jason.

    Thank you for sharing your experience

  480. Avatar
    Jasur January 19, 2020 at 2:34 pm #

    ##versions:

    scipy: 1.3.1
    numpy: 1.18.1
    matplotlib: 3.1.1
    pandas: 0.25.3
    statsmodels: 0.10.1
    sklearn: 0.22.1

    ##deep_versions:

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

    PS: thank you for sharing Jason, God bless you and your family!
    PPS: jumping on my first ML

  481. Avatar
    Jack Uppal January 21, 2020 at 7:56 pm #

    Jason, thank you for these posts- they were very helpful. I started with a little harder problem in regression where I try to fit a sine wave. If you try to do this simple mindedly, you get the program to just predict 0 as the answer since the average value of the sine wave over a number of periods is zero. It’s a local minimum in the cost curve. But, I learned a few things:
    1. I used one input layer of 20 neurons, 1 hidden layer of 20 neurons, another hidden layer of 8 neurons, and then in the graph I used these 8 neurons to act as coefficients in a power series of the original x input to produce one single output neuron.
    2. I learned that relu optimizer wasn’t a great idea- it would most often just give the output of zero. The sigmoid optimizer seemed to work better.
    3. The program was sensitive to starting data and the random starting weights and biases. I could run the same program a few times and get different results (sometimes the zero result, but some times something better- approaching the answer I would expect from a power series).

    Overall, it was a really fun exercise, and it took a bit of playing around to get it to do what I wanted. And, it all started with your tutorial on setting up an environment and your tutorial on regression analysis. I found that doing simple linear regression was very easy, and not that exciting. But, trying to conquer non-linear regression was a lot of fun. I’d be glad to share my code- not difficult, but it took me a little while to get comfortable with syntax and the whole concept of a computation graph and sess.run commands to pull information out of the calculations.

    Again, thank you.

  482. Avatar
    Olga January 25, 2020 at 12:53 am #

    Hi,
    Thanks very much for sharing.
    I have a question, I had to downgrade sckit-learn to 0.21.3 in order to run KnnImputer and now the kernel dies everytime I tried to load packages

    • Avatar
      Jason Brownlee January 25, 2020 at 8:37 am #

      Perhaps upgrade to the latest version of the library?

  483. Avatar
    William Gonzalez January 29, 2020 at 2:35 am #

    Here are my results

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

  484. Avatar
    Carter Fitzpatrick January 31, 2020 at 7:06 am #

    I get this error message:

    AttributeError: module ‘keras’ has no attribute ‘__version__’

    I only have keras and theano installed. I don’t have tensorflow.
    Can you help?
    Thanks.

    • Avatar
      Jason Brownlee January 31, 2020 at 8:00 am #

      It looks like keras might not be installed. Try rebooting and run code again, if it fails, perhaps try re-installing keras?

  485. Avatar
    Sonia Perez February 1, 2020 at 4:17 am #

    Output of versions.py:
    scipy: 1.3.2
    numpy: 1.18.1
    matplotlib: 3.1.2
    pandas: 1.0.0
    statsmodels: 0.11.0
    sklearn: 0.22.1

    Output of of deep_versions.py:
    tensorflow: 2.0.0
    Using TensorFlow backend.
    keras: 2.3.1

    Thank you for this tutorial!

  486. Avatar
    Tatiana February 13, 2020 at 2:02 am #

    Hi!
    For versions.py I have got (when “import statsmodels” and the respective “print” commented):
    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    sklearn: 0.22.1
    >>>
    Unfortunately, for “statsmodels” I have got in PyScripter the following:

    Traceback (most recent call last):
    File “D:\Python\My_modules\versions.py”, line 25, in
    import statsmodels
    ModuleNotFoundError: No module named ‘statsmodels’

    In Command Prompt:

    …python versions.py
    ‘Statistics_’ is not recognized as an internal or external command,
    operable program or batch file.
    The system cannot find the path specified.

    How can I proceed?

    • Avatar
      Jason Brownlee February 13, 2020 at 5:42 am #

      Well done.

      Perhaps skip statsmodels of you don’t intend to use time series forecasting?

      • Avatar
        Tatiana February 13, 2020 at 8:53 pm #

        Thank you! I’ll try to go forth…
        Before getting your answer I tried to install statsmodels manually using “pip install statsmodels”. I have got the following listing:

        C:\Users\Tatiana>pip install statsmodels
        Collecting statsmodels
        Downloading https://files.pythonhosted.org/packages/fd/6c/a73abc6ac29cb3e35b64
        ad97b0b34f6929017dc18287c097440f7e379764/statsmodels-0.11.0-cp37-none-win32.whl
        (7.7MB)
        100% |████████████████████████████████| 7.7MB 2.5MB/s
        Requirement already satisfied: pandas>=0.21 in c:\users\tatiana\appdata\roaming\
        python\python37\site-packages (from statsmodels) (1.0.1)
        Requirement already satisfied: numpy>=1.14 in c:\users\tatiana\appdata\roaming\p
        ython\python37\site-packages (from statsmodels) (1.18.1)
        Requirement already satisfied: scipy>=1.0 in c:\users\tatiana\appdata\roaming\py
        thon\python37\site-packages (from statsmodels) (1.4.1)
        Collecting patsy>=0.5 (from statsmodels)
        Downloading https://files.pythonhosted.org/packages/ea/0c/5f61f1a3d4385d6bf83b
        83ea495068857ff8dfb89e74824c6e9eb63286d8/patsy-0.5.1-py2.py3-none-any.whl (231kB
        )
        100% |████████████████████████████████| 235kB 10.2MB/s
        Requirement already satisfied: pytz>=2017.2 in c:\users\tatiana\appdata\roaming\
        python\python37\site-packages (from pandas>=0.21->statsmodels) (2019.3)
        Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\tatiana\appdat
        a\roaming\python\python37\site-packages (from pandas>=0.21->statsmodels) (2.8.1)

        Requirement already satisfied: six in c:\users\tatiana\appdata\roaming\python\py
        thon37\site-packages (from patsy>=0.5->statsmodels) (1.14.0)
        Installing collected packages: patsy, statsmodels
        Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: ‘c:\\program files (x86)\\python37-32\\Lib\\site-packages\\patsy’
        Consider using the --user option or check the permissions.

        MY QUESTION: I have python installed for 32 bit and Anaconda for 64 (I have selected Anaconda3-2019.10-Windows-x86_64.exe for installation):
        C:\Users\Tatiana>conda -V
        conda 4.7.12

        C:\Users\Tatiana>python -V
        Python 3.7.4

        Perhaps, this is the reason of the conflict? Shall I uninstall this version of Anaconda and install another for 32 bit?

        Thank you once more for your time!

        • Avatar
          Jason Brownlee February 14, 2020 at 6:32 am #

          The problem is: Access is denied

          Try changing your permissions.

  487. Avatar
    Andy B February 15, 2020 at 4:48 am #

    Here you go…

  488. Avatar
    Anders G February 16, 2020 at 3:18 am #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

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

    theano: 1.0.4
    tensorflow: 2.0.0
    keras: 2.3.1

    Great tutorial, setup is really havoc for a rookie without this. Now on to the real challenge =)

  489. Avatar
    Samaya February 19, 2020 at 12:36 am #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

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

  490. Avatar
    Margaret Oluwadare February 26, 2020 at 12:47 am #

    runfile(‘C:/Users/HP/OneDrive/Documents/adeloyejerome/versions.py’, wdir=’C:/Users/HP/OneDrive/Documents/adeloyejerome’)
    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

  491. Avatar
    Muhammad Sheehab February 26, 2020 at 7:53 am #

    I don’t personally like ANACONDA.

    What could be possible disadvantages, if I continue with google colab?

    Thanks

  492. Avatar
    Greg Skluzacek March 9, 2020 at 12:47 pm #

    Jason,
    What’s the rationale for using Anaconda over just using pip? I tend to use virtualenv and mostly understand what pip does when using it with virtualenv. But I’m not so sure about Anaconda.

    I’m not familiar with all the python packages that you mention, do they require special tools or compilation to install using pip.

    Also, I was surprised to see that the instructions indicated that you could install some packages with Anaconda and some with pip. The few times that I have used Anaconda and tried installing additional packages with pip, I’ve run into difficulties.

    So for the most part I use pip and stay away from tools like Anaconda. Are there any caveats that I should be aware of if I try to go the pip route?

    Thanks in advance.

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

      I find anaconda is simpler for beginners.

      You can use pip if you like.

  493. Avatar
    Greg Skluzacek March 10, 2020 at 9:11 am #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.2.0
    pandas: 1.0.1
    statsmodels: 0.11.1
    sklearn: 0.22.2.post1

  494. Avatar
    Raymond March 11, 2020 at 4:03 am #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

  495. Avatar
    BUmcikiwakwak March 12, 2020 at 5:41 am #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

    i got this…
    so may i know how to unzip the files exactly..do i use the command or spyder

    • Avatar
      Jason Brownlee March 12, 2020 at 8:54 am #

      Well done.

      Unzip what files exactly?

      • Avatar
        BUmcikiwakwak March 16, 2020 at 5:30 am #

        unzip file like in the “How to Develop a Neural Machine Translation System from Scratch” tutorial..please help me..i need to submit the project this week..huhuhuhuhuhu

        • Avatar
          Jason Brownlee March 16, 2020 at 5:59 am #

          Most operating systems can unzip a .zip file directly bu clicking on it.

          On a POSIX workstation, from the command line type:

          unzip filename.zip

          And replace “filename.zip” with the file you want to unzip.

  496. Avatar
    Samuel March 15, 2020 at 5:00 am #

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

  497. Avatar
    tarekegn March 17, 2020 at 8:32 pm #

    good tutorial …i have finished installation of python env/t…just studying ur steps to go further.hope you do help me.

  498. Avatar
    muhd asyraff March 18, 2020 at 5:29 am #

    how can i access posix workstation from anaconda??please help me

  499. Avatar
    Ajay Kumar March 20, 2020 at 7:44 am #

    C:\>python versions.py
    INTEL MKL ERROR: The operating system cannot run %1. mkl_intel_thread.dll.
    Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
    please resolve above erroe issue

    • Avatar
      Jason Brownlee March 20, 2020 at 8:53 am #

      Sorry to hear that, perhaps try posting your error on stackoverflow?

  500. Avatar
    Ajay Kumar March 21, 2020 at 3:14 am #

    while checking of deep learning below error came.please resolve it.
    C:\>python deep_versions.py

    You can find the C code in this temporary file: C:\Users\admin\AppData\Local\Temp\theano_compilation_error_j7xpd1u_
    library mingw32 is not found.
    library mingw32 is not found.
    library moldname is not found.
    library moldname is not found.
    library mingwex is not found.
    library mingwex is not found.
    library msvcrt is not found.
    library msvcrt is not found.
    library advapi32 is not found.
    library advapi32 is not found.
    library shell32 is not found.
    library shell32 is not found.
    library user32 is not found.
    library user32 is not found.
    library kernel32 is not found.
    library kernel32 is not found.
    library mingw32 is not found.
    library mingw32 is not found.
    library moldname is not found.
    library moldname is not found.
    library mingwex is not found.
    library mingwex is not found.
    library msvcrt is not found.
    library msvcrt is not found.
    Traceback (most recent call last):
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\gof\lazylinker_c.py”, line 81, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\gof\lazylinker_c.py”, line 105, in
    actual_version, force_compile, _need_reload))
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    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\admin\anaconda3\lib\site-packages\theano\__init__.py”, line 110, in
    from theano.compile import (
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\compile\__init__.py”, line 12, in
    from theano.compile.mode import *
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\compile\mode.py”, line 11, in
    import theano.gof.vm
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\gof\vm.py”, line 674, in
    from . import lazylinker_c
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\gof\lazylinker_c.py”, line 140, in
    preargs=args)
    File “C:\Users\admin\anaconda3\lib\site-packages\theano\gof\cmodule.py”, line 2399, in compile_str
    (status, compile_stderr.replace(‘\n’, ‘. ‘)))
    Exception: Compilation failed (return status=1): C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/g95/lib/../lib/libmingw32.a when searchi. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. C:/Users/admin/anaconda3/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/. collect2.exe: error: ld returned 1 exit statusx15f): undefined reference to `___dllonexit’me_relocator’

    • Avatar
      Jason Brownlee March 21, 2020 at 8:27 am #

      Sorry, I have not seen this error before, perhaps try searching/posting on stackoverflow.

      • Avatar
        Randy Pratt March 23, 2020 at 12:30 pm #

        This is related to an earlier warning: WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain

        I installed m2w64-toolchain and then got the above mentioned errors. Removing the compiler put me back to using the tensor-flow backend:

        WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
        C:\Users\rprat\Anaconda3\envs\obspy\lib\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.4
        tensorflow: 1.13.1
        Using TensorFlow backend.
        keras: 2.3.1

        I have not gone farther to test this result.

        • Avatar
          Jason Brownlee March 23, 2020 at 1:23 pm #

          Well done!

          You can safely ignore the warnings for now.

          • Avatar
            Randy March 23, 2020 at 4:34 pm #

            I have the warnings fixed now.
            installed mingw followed libpython followed by m2w64-toolchain.
            Then download latest Theano from github and install using setup.py

            In [1]: %run packageversions.py
            scipy: 1.3.1
            numpy: 1.15.4
            matplotlib: 3.2.1
            pandas: 1.0.3
            statsmodels: 0.11.1
            sklearn: 0.22.2.post1
            obspy: 1.1.1
            theano: 1.0.4+unknown
            tensorflow: 1.13.1
            Using TensorFlow backend.
            keras: 2.3.1

          • Avatar
            Jason Brownlee March 24, 2020 at 5:59 am #

            Well done!

  501. Avatar
    Ahmed March 28, 2020 at 5:09 am #

    Hi there, big thanks for this community, I’m learning a lot.
    Here are the versions:

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3
    theano: 1.0.4
    tensorflow: 2.1.0
    Using TensorFlow backend.
    keras: 2.3.1

  502. Avatar
    VICENTE CASTILLO GUILLÉN March 28, 2020 at 10:11 pm #

    scipy: 1.2.1
    numpy: 1.16.2
    matplotlib: 3.0.3
    pandas: 0.24.2
    statsmodels: 0.9.0
    sklearn: 0.20.3

  503. Avatar
    VICENTE CASTILLO GUILLÉN March 28, 2020 at 10:19 pm #

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

  504. Avatar
    Ken Selvia March 31, 2020 at 11:46 pm #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.2.1
    pandas: 1.0.3
    statsmodels: 0.12.0.dev0+146.gc0b5d397a
    sklearn: 0.23.dev0

    (Built all sources because i had to do that with PyTorch to make CUDA 10.2 work. Also figured it might let me debug, profile and tune better.)

  505. Avatar
    Omkar April 10, 2020 at 7:09 am #

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

  506. Avatar
    Omkar Pradhan April 10, 2020 at 7:15 am #

    theano: 1.0.4
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:528: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint16 = np.dtype([(“qint16”, np.int16, 1)])
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:529: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint16 = np.dtype([(“quint16”, np.uint16, 1)])
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:530: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint32 = np.dtype([(“qint32”, np.int32, 1)])
    D:\Ananconda\lib\site-packages\tensorflow\python\framework\dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    np_resource = np.dtype([(“resource”, np.ubyte, 1)])
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.3.1

    I don’t know why the errors came in tensorflow, I am using windows 10

    • Avatar
      Jason Brownlee April 10, 2020 at 8:39 am #

      They are warnings, you can safely ignore them.

      Also, you should update to tensorflow 2.1 if you can.

  507. Avatar
    Yousif April 17, 2020 at 7:11 pm #

    Hi Jason,

    I installed Theano, but when I closed the Anaconda CMD and started it again and tried to import theano, i get the following error:

    Traceback (most recent call last):
    File “”, line 1, in
    ModuleNotFoundError: No module named ‘theano’

    I’m sure i followed the instructions and installed. Any advice?

  508. Avatar
    Roland Dosa April 18, 2020 at 4:23 am #

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

  509. Avatar
    Yousif April 19, 2020 at 12:51 am #

    Hi Jason,

    I tried re-booting but i still didnt work, ire-installed it, and now its ok. I finished installing Tensorflow, and when i import it iget the following long text:

    >>> import tensorflow
    Traceback (most recent call last):
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
    File “C:\Users\LENOVO\anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\Users\LENOVO\anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed: The specified module could not be found.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “”, line 1, in
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 101, in
    from tensorflow_core import *
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\__init__.py”, line 40, in
    from tensorflow.python.tools import module_util as _module_util
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 50, in __getattr__
    module = self._load()
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow\__init__.py”, line 44, in _load
    module = _importlib.import_module(self.__name__)
    File “C:\Users\LENOVO\anaconda3\lib\importlib\__init__.py”, line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 74, in
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py”, line 58, in
    from tensorflow.python.pywrap_tensorflow_internal import *
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 28, in
    _pywrap_tensorflow_internal = swig_import_helper()
    File “C:\Users\LENOVO\anaconda3\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
    _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description)
    File “C:\Users\LENOVO\anaconda3\lib\imp.py”, line 242, in load_module
    return load_dynamic(name, filename, file)
    File “C:\Users\LENOVO\anaconda3\lib\imp.py”, line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed: The specified module could not be found.

    Failed to load the native TensorFlow runtime.

    See https://www.tensorflow.org/install/errors

    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

    Any idea whats going on here?

    Regards,

    Yousif

    • Avatar
      Jason Brownlee April 19, 2020 at 5:57 am #

      Sorry to hear that, it looks like a problem with your tensorflow installation.

      Perhaps try reinstalling?
      Perhaps try installing via conda or via pip?
      Perhaps try searching/posting on stackoverflow?

  510. Avatar
    YAW ANTWI-ADJEI April 21, 2020 at 6:57 pm #

    Thank you. I got the following:
    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

  511. Avatar
    Yousif April 23, 2020 at 6:05 am #

    Hi Jason,

    I have downgraded to tensorflow 2.0 and it worked fine now. I got the following:

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

    Cheers

  512. Avatar
    wiki April 24, 2020 at 2:48 am #

    tensorflow: 1.14.0
    keras: 2.3.1
    theano: 1.0.4
    tensorflow: 1.14.0
    keras: 2.3.1

  513. Avatar
    abhineet April 26, 2020 at 2:47 am #

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

  514. Avatar
    mars May 4, 2020 at 2:29 am #

    Im getting the same stdio error a lot of people get:

    Exception: Compilation failed (return status=1): In file included from /Users/mars/.theano/compiledir_Darwin-19.4.0-x86_64-i386-64bit-i386-2.7.16-64/lazylinker_ext/mod.cpp:1:. In file included from /opt/anaconda2/include/python2.7/Python.h:33:. /opt/anaconda2/bin/../include/c++/v1/stdio.h:108:15: fatal error: ‘stdio.h’ file not found. #include_next .

    • Avatar
      Jason Brownlee May 4, 2020 at 6:25 am #

      Sorry to hear that, perhaps try searching or posting on stackoverflow?

  515. Avatar
    e2e4 May 4, 2020 at 2:47 am #

    scipy 1.4.1
    numpy 1.18.1
    matplotlib 3.1.3
    pandas 1.0.3
    statsmodels 0.11.0
    sklearn 0.22.1

  516. Avatar
    e2e4 May 4, 2020 at 7:18 pm #

    Hi Jason.
    I’ve installed theano and keras but after running deepversions got the response below. Any idea how to solve? I’m on Win8.1

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions.py
    theano: 1.0.4
    Traceback (most recent call last):
    File “deepversions.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>pip install keras
    Requirement already satisfied: keras in c:\users\nik\anaconda3\lib\site-packages
    (2.3.1)
    Requirement already satisfied: scipy>=0.14 in c:\users\nik\anaconda3\lib\site-pa
    ckages (from keras) (1.4.1)
    Requirement already satisfied: six>=1.9.0 in c:\users\nik\anaconda3\lib\site-pac
    kages (from keras) (1.14.0)
    Requirement already satisfied: numpy>=1.9.1 in c:\users\nik\anaconda3\lib\site-p
    ackages (from keras) (1.18.1)
    Requirement already satisfied: h5py in c:\users\nik\anaconda3\lib\site-packages
    (from keras) (2.10.0)
    Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\users\nik\anacon
    da3\lib\site-packages (from keras) (1.1.0)
    Requirement already satisfied: keras-applications>=1.0.6 in c:\users\nik\anacond
    a3\lib\site-packages (from keras) (1.0.8)
    Requirement already satisfied: pyyaml in c:\users\nik\anaconda3\lib\site-package
    s (from keras) (5.3.1)

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversion2.py
    python: can’t open file ‘deepversion2.py’: [Errno 2] No such file or directory

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversion.py
    python: can’t open file ‘deepversion.py’: [Errno 2] No such file or directory

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions3.py
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions3.py”, line 2, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 10
    eras normalize_tuple(value, n, name):
    ^
    SyntaxError: invalid syntax

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>keras
    “keras” не является внутренней или внешней
    командой, исполняемой программой или пакетным файлом.

    (base) E:\nik\Deti\Митя\MachineLearning>python -load_backend
    Unknown option: -l
    usage: python [option] … [-c cmd | -m mod | file | -] [arg] …
    Try `python -h’ for more information.

    (base) E:\nik\Deti\Митя\MachineLearning>python -h
    usage: python [option] … [-c cmd | -m mod | file | -] [arg] …
    Options and arguments (and corresponding environment variables):
    -b : issue warnings about str(bytes_instance), str(bytearray_instance)
    and comparing bytes/bytearray with str. (-bb: issue errors)
    -B : don’t write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x
    -c cmd : program passed in as string (terminates option list)
    -d : debug output from parser; also PYTHONDEBUG=x
    -E : ignore PYTHON* environment variables (such as PYTHONPATH)
    -h : print this help message and exit (also –help)
    -i : inspect interactively after running script; forces a prompt even
    if stdin does not appear to be a terminal; also PYTHONINSPECT=x
    -I : isolate Python from the user’s environment (implies -E and -s)
    -m mod : run library module as a script (terminates option list)
    -O : remove assert and __debug__-dependent statements; add .opt-1 before
    .pyc extension; also PYTHONOPTIMIZE=x
    -OO : do -O changes and also discard docstrings; add .opt-2 before
    .pyc extension
    -q : don’t print version and copyright messages on interactive startup
    -s : don’t add user site directory to sys.path; also PYTHONNOUSERSITE
    -S : don’t imply ‘import site’ on initialization
    -u : force the stdout and stderr streams to be unbuffered;
    this option has no effect on stdin; also PYTHONUNBUFFERED=x
    -v : verbose (trace import statements); also PYTHONVERBOSE=x
    can be supplied multiple times to increase verbosity
    -V : print the Python version number and exit (also –version)
    when given twice, print more information about the build
    -W arg : warning control; arg is action:message:category:module:lineno
    also PYTHONWARNINGS=arg
    -x : skip first line of source, allowing use of non-Unix forms of #!cmd
    -X opt : set implementation-specific option
    –check-hash-based-pycs always|default|never:
    control how Python invalidates hash-based .pyc files
    file : program read from script file
    – : program read from stdin (default; interactive mode if a tty)
    arg …: arguments passed to program in sys.argv[1:]

    Other environment variables:
    PYTHONSTARTUP: file executed on interactive startup (no default)
    PYTHONPATH : ‘;’-separated list of directories prefixed to the
    default module search path. The result is sys.path.
    PYTHONHOME : alternate directory (or ;).
    The default module search path uses \python{major}{minor}
    .
    PYTHONCASEOK : ignore case in ‘import’ statements (Windows).
    PYTHONUTF8: if set to 1, enable the UTF-8 mode.
    PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
    PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.
    PYTHONHASHSEED: if this variable is set to ‘random’, a random value is used
    to seed the hashes of str, bytes and datetime objects. It can also be
    set to an integer in the range [0,4294967295] to get hash values with a
    predictable seed.
    PYTHONMALLOC: set the Python memory allocators and/or install debug hooks
    on Python memory allocators. Use PYTHONMALLOC=debug to install debug
    hooks.
    PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale
    coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of
    locale coercion and locale compatibility warnings on stderr.
    PYTHONBREAKPOINT: if this variable is set to 0, it disables the default
    debugger. It can be set to the callable of your debugger of choice.
    PYTHONDEVMODE: enable the development mode.

    (base) E:\nik\Deti\Митя\MachineLearning>python versions.py
    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.3
    statsmodels: 0.11.0
    sklearn: 0.22.1

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions.py
    theano: 1.0.4
    Traceback (most recent call last):
    File “deepversions.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python versions.py
    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.3
    statsmodels: 0.11.0
    sklearn: 0.22.1

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

    (base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py

    • Avatar
      Jason Brownlee May 5, 2020 at 6:23 am #

      Sorry to hear that, perhaps try searching/posting on stackoverflow.

  517. Avatar
    e2e4 May 4, 2020 at 9:51 pm #

    Hi Jason, sorry for last past operation. Here is the precise resultin question. Any ideas?

    base) E:\nik\Deti\Митя\MachineLearning>python deepversions2.py
    theano: 1.0.4
    Using TensorFlow backend.
    Traceback (most recent call last):
    File “deepversions2.py”, line 5, in
    import keras
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in

    from . import utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\__init__.py”, line
    6, in
    from . import conv_utils
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\utils\conv_utils.py”, lin
    e 9, in
    from .. import backend as K
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\__init__.py”, lin
    e 1, in
    from .load_backend import epsilon
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\load_backend.py”,
    line 90, in
    from .tensorflow_backend import *
    File “C:\Users\nik\anaconda3\lib\site-packages\keras\backend\tensorflow_backen
    d.py”, line 5, in
    import tensorflow as tf
    ModuleNotFoundError: No module named ‘tensorflow’

  518. Avatar
    Deep-learning_newby May 6, 2020 at 7:00 pm #

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

    It would be helpful to include the installation of sklearn for win-64, since this was not that straighforward for a newby like me.

    • Avatar
      Jason Brownlee May 7, 2020 at 6:45 am #

      Well done!

      Sorry, I don’t have access or even know how to use a windows box.

      I’m surprised developers still use windows after all of these years!

  519. Avatar
    Dorothy Ann Sanchez May 7, 2020 at 3:00 pm #

    Oh, thinks now it works. I used Spyder instead of Jupyter Notebook
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1
    theano: 1.0.4
    tensorflow: 1.13.1
    keras: 2.3.1

    • Avatar
      Jason Brownlee May 8, 2020 at 6:19 am #

      I believe you need to upgrade hour version of tensorflow to 2.0 or higher.

  520. Avatar
    sukh May 26, 2020 at 8:15 pm #

    sir how to install pip.as spyder give error name pip is not defined

    • Avatar
      Jason Brownlee May 27, 2020 at 7:46 am #

      The pip command is run from the command prompt, not from spyder.

  521. Avatar
    Massimiliano May 28, 2020 at 10:44 pm #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.2.1
    pandas: 1.0.3
    statsmodels: 0.11.1
    sklearn: 0.23.1
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.4
    tensorflow: 2.0.0
    Using TensorFlow backend.
    keras: 2.3.1

    I got several warning messages regarding Theano configurations. How can I fix’em?

    Thx.
    M.

  522. Avatar
    Muthurajan June 1, 2020 at 5:16 pm #

    scipy: 1.4.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3

    These are the versions in my anaconda.

  523. Avatar
    Henry Alfonso Guio Avila June 3, 2020 at 9:01 am #

    theano: 1.0.4
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:528: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint16 = np.dtype([(“qint16”, np.int16, 1)])
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:529: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint16 = np.dtype([(“quint16”, np.uint16, 1)])
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:530: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint32 = np.dtype([(“qint32”, np.int32, 1)])
    C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    np_resource = np.dtype([(“resource”, np.ubyte, 1)])
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.3.1

    • Avatar
      Jason Brownlee June 3, 2020 at 1:15 pm #

      It looks like you need to update your version of tensorflow to v2.0 or higher.

  524. Avatar
    Murali June 5, 2020 at 12:47 am #

    Thank you for the clear and simple steps to set up Python for machine learning. Below was my script output. I’m guess the warnings about deprecated features shouldn’t be an issue as I don’t have any existing code.

    theano: 1.0.4
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint16 = np.dtype([(“qint16”, np.int16, 1)])
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint16 = np.dtype([(“quint16”, np.uint16, 1)])
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint32 = np.dtype([(“qint32”, np.int32, 1)])
    /opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    np_resource = np.dtype([(“resource”, np.ubyte, 1)])
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.3.1

  525. Avatar
    sukhpal June 6, 2020 at 12:11 am #

    sir i have re-installed python 3.6 through anaconda and it gives me error
    This python interpreter is in conda environment.but the environment has not activated.Sir how i activate environment

    • Avatar
      Jason Brownlee June 6, 2020 at 7:52 am #

      Sorry to hear that. Perhaps contact anaconda support or search/post on stackoverflow.

  526. Avatar
    Bruce D. Sidlinger June 6, 2020 at 7:09 am #

    (base) MacBookAir81-2:~ sidlinger$ nano versions.py
    (base) MacBookAir81-2:~ sidlinger$ 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) MacBookAir81-2:~ sidlinger$

  527. Avatar
    Joseph June 6, 2020 at 11:09 pm #

    Hi Jason,

    Thanks for the tutorial, I have install the ML and DL packages successfully, but when running DL model it gets very slow. I heard about GPU as possible way to speed up the process. Could you please explain how to connect the packages to GPU to increase the processing speed? Is there any other solution apart from GPU? Many thanks

  528. Avatar
    Muz miles June 11, 2020 at 3:50 am #

    hi do you know how can i put caffe module inside the pkg file. cause i got installed the caffe but it appear on the envs file. i cant import caffe

  529. Avatar
    Pallabi June 12, 2020 at 7:46 pm #

    Hi Jason,

    I hope you are well! I saved the version.py and deep_versions.py as mentioned then in cmd I cd to the folder where I saved the versions.py file and after that, I gave the command python versions.py and same I did it for the deep_versions.py. I didn’t get any response and then I tried with anaconda prompt it came up with an error message
    python: can’t open file ‘versions.py’: [Errno 2] No such file or directory
    Then I run the same codes from Jupyter notebook and here is the result
    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.3
    statsmodels: 0.11.1
    sklearn: 0.22.1

    theano: 1.0.4
    tensorflow: 1.13.1
    keras: 2.3.1

    Please let me know if I am missing something. I would also like to know is it possible to use Tensorflow 2 instead of tensorflow 1.13.1.
    Thank you for your answer in advance.
    Kind Regards,

  530. Avatar
    Eriya June 15, 2020 at 2:24 pm #

    Hi Jason
    Here the result that I run on the Jupyter notebook.

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.3
    statsmodels: 0.11.1
    sklearn: 0.22.1

    theano: 1.0.4
    tensorflow: 1.13.1
    keras: 2.3.1

    • Avatar
      Jason Brownlee June 16, 2020 at 5:32 am #

      Well done!

      Consider updating to the latest version of tensorflow.

  531. Avatar
    Patrick T. June 17, 2020 at 11:02 pm #

    Hi Jason, here is the result that I’ve got from my command line. Any comment?

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.4
    statsmodels: 0.11.1
    sklearn: 0.22.1

    =======================
    =======================

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.4
    statsmodels: 0.11.1
    sklearn: 0.22.1

    =======================
    =======================
    theano: 1.0.4
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint8 = np.dtype([(“qint8”, np.int8, 1)])
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint8 = np.dtype([(“quint8”, np.uint8, 1)])
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:528: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint16 = np.dtype([(“qint16”, np.int16, 1)])
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:529: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_quint16 = np.dtype([(“quint16”, np.uint16, 1)])
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:530: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    _np_qint32 = np.dtype([(“qint32”, np.int32, 1)])
    C:\Users\salut\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:535: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / ‘(1,)type’.
    np_resource = np.dtype([(“resource”, np.ubyte, 1)])
    tensorflow: 1.13.1
    Using TensorFlow backend.
    keras: 2.3.1

  532. Avatar
    Patrick T. June 18, 2020 at 8:08 pm #

    Thanks

  533. Avatar
    Sangamithra Varadarajan June 19, 2020 at 4:36 pm #

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

  534. Avatar
    sukhpal June 21, 2020 at 12:53 am #

    sir how i activate conda environment

    • Avatar
      Jason Brownlee June 21, 2020 at 6:26 am #

      Follow the above tutorial, if you have problems with anaconda specifically, perhaps contact anaconda support directly or try posting on stackoverflow.

  535. Avatar
    Ken June 23, 2020 at 4:13 pm #

    Installed OS X Anaconda graphical installer. Opened terminal and typed conda -V. Says command not found. Restarted system. Still not working…. wondering where did it go wrong? Any suggestion?

    • Avatar
      Jason Brownlee June 24, 2020 at 6:22 am #

      Perhaps try a reboot?
      Perhaps ensure you open the “anaconda prompt”?

  536. Avatar
    Scott July 2, 2020 at 7:06 pm #

    Here’s my deep_versions.py output:
    theano: 1.0.4
    2020-07-02 02:03:36.144717: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
    2020-07-02 02:03:36.150181: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.2.0
    keras: 2.4.3

    It’s outputting the versions, but I get an error where ‘cudart64_101.dll’ is missing.

    • Avatar
      Jason Brownlee July 3, 2020 at 6:12 am #

      Well done!

      I don’t know about that error, sorry. Perhaps you can try searching/posting on stackoverflow?

  537. Avatar
    Richard Curtis July 4, 2020 at 6:11 am #

    scipy: 1.1.0
    numpy: 1.15.4
    matplotlib: 2.2.3
    pandas: 0.23.4
    statsmodels: 0.9.0
    sklearn: 0.20.1

    File “deep_versions.py”, line 5, in
    import tensorflow
    ImportError: No module named tensorflow

    I installed the modules in Microsoft Visual Studio Code using Python 3.5.2 (64 bit) and all modules installed, however, still got the error shown above. Tensorflow installed ok with Python 3.5.2 but failed with most other Python versions I tried. However, when I ran keras_first_network.py the program ran without output:

    Epoch 148/150
    77/77 [==============================] – 0s 1ms/step – accuracy: 0.7695 – loss: 0.4908
    Epoch 149/150
    77/77 [==============================] – 0s 2ms/step – accuracy: 0.7786 – loss: 0.4911
    Epoch 150/150
    77/77 [==============================] – 0s 2ms/step – accuracy: 0.7604 – loss: 0.5069
    24/24 [==============================] – 0s 1ms/step – accuracy: 0.7487 – loss: 0.4960
    Accuracy: 74.87

    • Avatar
      Jason Brownlee July 5, 2020 at 6:46 am #

      Nive work.

      If tensorflow is installed and working in another environment, the error may suggest that tensorflow is not available from the command prompt / path where you ran the script.

  538. Avatar
    Patrick T. July 7, 2020 at 3:01 am #

    done on ubuntu20 LTS

    versions.py
    =========

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    ############################
    ############################

    deep_versions.py
    =============

    theano: 1.0.4
    tensorflow: 2.2.0
    keras: 2.4.3

  539. Avatar
    swapna July 17, 2020 at 3:42 pm #

    Hi Jason,

    How to upgrade tensorflow from 1.12.0 to 1.15.2 in windows 64 bit using anaconda..?

    • Avatar
      Jason Brownlee July 17, 2020 at 3:46 pm #

      As follows:

  540. Avatar
    eschak jr July 18, 2020 at 1:47 am #

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

  541. Avatar
    M July 18, 2020 at 2:45 pm #

    scipy: 1.4.1
    numpy: 1.18.5
    matpoltlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    ——–

    theano: 1.0.4
    2020-07-17 23:27:45. 047716: W tensorflow/strem_executor/pltform/default/dso_loader.cc:59] Could not load dynamic library ‘cudart64_101.dll’ : dlerror: cudrt64_101.dll not found
    2020-07-17 23:37:45.059210: I tensorflow/stream_executor/cude/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.4.0
    keras: 2.4.3

    • Avatar
      Jason Brownlee July 19, 2020 at 6:22 am #

      Well done!

      You might have an issue with your GPU configuration, perhaps check the tensorlflow documentation.

  542. Avatar
    Jagadish July 20, 2020 at 1:23 pm #

    Hi..I have Nvidia Geforce 820M GPU. Is it suitable for CNN computation? Which cuda version i need to install? plz help

    • Avatar
      Jason Brownlee July 20, 2020 at 1:53 pm #

      Perhaps start with the CPU for now, and move over to the GPU once you have your environment working reliably.

  543. Avatar
    Aragorn July 26, 2020 at 2:29 am #

    scipy: 1.4.1
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    sklearn: 0.23.1
    ____________________________________________
    theano: 1.0.4
    2020-07-25 18:21:20.522296: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
    2020-07-25 18:21:20.523081: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.2.0
    keras: 2.4.3

    I reinstalled Windows just yesterday, had a few issues with installing Tensorflow, maybe I had some C++ files missing, I’m not sure. I had an error, then I installed some C++ redistributable files and restarted my PC and then it gave this message. My GPU driver is updated to latest in Nvidia experience. I’ll stick to CPU at least for now, at the moment, I’m more interested in ML then in DL.

    Thanks for this great tutorial series!

    • Avatar
      Jason Brownlee July 26, 2020 at 6:24 am #

      Nice work.

      Looks like problems for GPU, you might want to search/post on stackoverflow.

  544. Avatar
    Madhav kumar July 28, 2020 at 4:46 pm #

    (base) C:\Users/>python
    Python 3.8.3 (default, Jul 2 2020, 17:28:51) [MSC v.1916 32 bit (Intel)] :: Anaconda, Inc. on win32
    Type “help”, “copyright”, “credits” or “license” for more information.
    >>> import theano

    >>> import keras

    Traceback (most recent call last):
    File “C:\Users\madha\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
    ModuleNotFoundError: No module named ‘tensorflow’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “”, line 1, in
    File “C:\Users\madha\anaconda3\lib\site-packages\keras\__init__.py”, line 5, in
    raise ImportError(
    ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow
    >>>

  545. Avatar
    Nagireddy August 1, 2020 at 9:10 pm #

    (base) C:\Target\Python>python versions.py
    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

  546. Avatar
    Gilloux August 3, 2020 at 5:27 am #

    (base) PS C:\Users\xxx\python\scripts> python .\versions.py
    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    (base) PS C:\Users\xxx\python\scripts> python .\deep_versions.py
    theano: 1.0.4
    2020-08-02 21:20:35.802948: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
    2020-08-02 21:20:35.803038: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.2.0
    keras: 2.4.3

    It looks that I’ve the same kind of issues than other people.
    I’ve tryed many things – installing visual studio, blablabla …. but the install procedure on tensorflow site is quite poor for windows install … or maybe i missed something … or too old for such things 🙁

    • Avatar
      Jason Brownlee August 3, 2020 at 5:54 am #

      Well done!

      Sorry, I can’t help you with configuring cuda. Perhaps try posting on stackoverflow.

  547. Avatar
    James August 3, 2020 at 5:47 am #

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1
    …………………………………………….
    UnsatisfiableError: The following specifications were found
    to be incompatible with the existing python installation in your environment:

    Specifications:

    – tensorflow -> python[version=’2.7.*|3.5.*|3.6.*|>=2.7,=3.6,=3.7,=3.5,<3.6.0a0|3.4.*|3.7.*']

    Your python: python=3.8

    If python is on the left-most side of the chain, that's the version you've asked for.
    When python appears to the right, that indicates that the thing on the left is somehow
    not available for the python version you are constrained to. Note that conda will not
    change your python version to a different minor version unless you explicitly specify
    that.

  548. Avatar
    Gilloux August 3, 2020 at 5:50 am #

    It looks to be my fault …. I’ve installed cuda 11.02 🙂
    And …. tensorflow 2.x requires Cuda 10.1 !!!!
    https://developer.nvidia.com/cuda-toolkit-archive

    I’m currently downloading the right file and cross the fingers.

    cheers Gilles.

    • Avatar
      Jason Brownlee August 3, 2020 at 5:54 am #

      Well done, I’m happy to hear you solved the problem!

      • Avatar
        Gilloux August 6, 2020 at 2:49 am #

        I confirm – After the CUDA uninstall (v11.x) and reinstall (v10.1).
        evrything is fine now 🙂

        scipy: 1.5.0
        numpy: 1.18.5
        matplotlib: 3.2.2
        pandas: 1.0.5
        statsmodels: 0.11.1
        sklearn: 0.23.1
        theano: 1.0.4

        2020-08-05 18:47:59.451481: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
        tensorflow: 2.2.0
        keras: 2.4.3

        cheers – gilles

  549. Avatar
    Ummaruje August 11, 2020 at 3:13 am #

    I followed all the steps but i have some errors at the last part. below are my outputs:

    theano: 1.0.4
    Illegal instruction: 4

    once it execute the theano, when it started executing tensorflow and keras it gives me Illegal instruction: 4

    • Avatar
      Jason Brownlee August 11, 2020 at 6:36 am #

      Sorry to hear that.

      I have not seen this error before, perhaps try searching/posting on stackoverflow?

  550. Avatar
    Daiane August 13, 2020 at 6:22 am #

    Minhas saídas

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

  551. Avatar
    gupta August 13, 2020 at 11:09 pm #

    hi i saved versions.py file in python script then run in anaconda prompt python versions.py it gives error why?? solve my problem plz

  552. Avatar
    venkat August 15, 2020 at 3:27 am #

    I am trying to install pip install keras>=2.2.0 in redhat-7 linux container and getting below error

    DEPRECATION: Could not build wheels for h5py which do not use PEP 517. pip will fall back to legacy ‘setup.py install’ for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    Installing collected packages: h5py, keras
    Running setup.py install for h5py … error
    ERROR: Command errored out with exit status 1:
    command: /opt/app-root/bin/python3.6 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘/tmp/pip-install-du2r6t5x/h5py/setup.py'”‘”‘; __file__='”‘”‘/tmp/pip-install-du2r6t5x/h5py/setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record /tmp/pip-record-9mifjysv/install-record.txt –single-version-externally-managed –compile –install-headers /opt/app-root/include/site/python3.6/h5py
    cwd: /tmp/pip-install-du2r6t5x/h5py/

    ERROR: Command errored out with exit status 1: /opt/app-root/bin/python3.6 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘/tmp/pip-install-du2r6t5x/h5py/setup.py'”‘”‘; __file__='”‘”‘/tmp/pip-install-du2r6t5x/h5py/setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ install –record /tmp/pip-record-9mifjysv/install-record.txt –single-version-externally-managed –compile –install-headers /opt/app-root/include/site/python3.6/h5py Check the logs for full command output.

    • Avatar
      Jason Brownlee August 15, 2020 at 6:35 am #

      Ouch, I have not seen this before, perhaps try keras 2.4, tensroflow 2.3 and check everything else is up to date.

  553. Avatar
    Murilo August 18, 2020 at 4:58 am #

    Hello, Anaconda now comes with Python 3.8. But in Tensorflow page it says i need Python 3.5-3.7. Is there anyway i can download Anaconda with those Python versions?

    • Avatar
      Jason Brownlee August 18, 2020 at 6:07 am #

      Perhaps there is an older version of Anaconda on their website you can find?

      Perhaps try it anyway?

      • Avatar
        Murilo August 18, 2020 at 7:12 am #

        Thanks for the fast reply. I Couldn’t find anything in their website about older versions of Anaconda.

        Any other ideas in how i can make it work?

  554. Avatar
    Mar August 19, 2020 at 4:58 pm #

    Hi Jason, my result:

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    Are there any new interesting library we should install?

    • Avatar
      Jason Brownlee August 20, 2020 at 6:35 am #

      Well done!

      Not really. These are the main libraries.

  555. Avatar
    Mar August 20, 2020 at 9:30 pm #

    OK.Thanks!!

  556. Avatar
    Yasser Taima August 22, 2020 at 12:34 pm #

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    theano: 1.0.4
    tensorflow: 2.2.0
    keras: 2.4.3

    So far so good!

    Is it possible to tweak this page so as to view the latest comments first?

    Thanks

  557. Avatar
    ROSS D MACKAY August 27, 2020 at 12:00 am #

    theano: 1.0.4
    2020-08-26 14:57:45.193692: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
    2020-08-26 14:57:45.198857: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.3.0
    keras: 2.4.3

    Any idea? To me it seems that the GPU is not recognised

    • Avatar
      Jason Brownlee August 27, 2020 at 6:16 am #

      Well done!

      Sorry, I’m not familiar with that error, perhaps try searching/posting on stackoverflow?

      • Avatar
        ROSS D MACKAY August 27, 2020 at 7:05 am #

        OK, I will. Thanks!

        • Avatar
          ROSS D MACKAY August 28, 2020 at 12:35 am #

          Cuda installation was corrupted. Reinstalled. Now looking better.

  558. Avatar
    Ravi Kumar Kattempudi August 27, 2020 at 7:20 pm #

    Hi Jason,

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

  559. Avatar
    Minghua Tan September 1, 2020 at 10:24 pm #

    theano: 1.0.4
    tensorflow: 2.3.0
    keras: 2.4.3

  560. Avatar
    Minghua Tan September 1, 2020 at 10:37 pm #

    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

  561. Avatar
    Ganapathy Subramaniam September 3, 2020 at 12:53 pm #

    scipy: 1.3.1
    numpy: 1.16.5
    matplotlib: 3.1.1
    pandas: 0.25.1
    statsmodels: 0.10.1
    sklearn: 0.21.3
    tensorflow: 2.3.0
    keras: 2.4.3

    • Avatar
      Ganapathy Subramaniam September 3, 2020 at 1:01 pm #

      Thanks much for this tutorial..
      My updated versions

      scipy: 1.5.2
      numpy: 1.19.1
      matplotlib: 3.3.1
      pandas: 1.1.1
      statsmodels: 0.12.0
      sklearn: 0.21.3
      tensorflow: 2.3.0
      keras: 2.4.3

    • Avatar
      Jason Brownlee September 3, 2020 at 1:39 pm #

      Well done!

  562. Avatar
    Shaima September 3, 2020 at 9:10 pm #

    Thanks a lot.

  563. Avatar
    Jyothsna September 6, 2020 at 2:31 am #

    Sir, I am using windows 10
    No way is mentioned to install tensorflow and you said theano itself will be enough for keras.
    When I try to install keras, Error Occurs
    ERROR: Error while checking for conflicts. Please file an issue on pip’s issue tracker: https://github.com/pypa/pip/issues/new
    Traceback (most recent call last):
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 3021, in _dep_map
    return self.__dep_map
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 2815, in __getattr__
    raise AttributeError(attr)
    AttributeError: _DistInfoDistribution__dep_map

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 3012, in _parsed_pkg_info
    return self._pkg_info
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 2815, in __getattr__
    raise AttributeError(attr)
    AttributeError: _pkg_info

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “D:\Josh_python\lib\site-packages\pip\_internal\commands\install.py”, line 535, in _determine_conflicts
    return check_install_conflicts(to_install)
    File “D:\Josh_python\lib\site-packages\pip\_internal\operations\check.py”, line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
    File “D:\Josh_python\lib\site-packages\pip\_internal\operations\check.py”, line 50, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 2736, in requires
    dm = self._dep_map
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all(‘Requires-Dist’) or []:
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 1420, in get_metadata
    value = self._get(path)
    File “D:\Josh_python\lib\site-packages\pip\_vendor\pkg_resources\__init__.py”, line 1616, in _get
    with open(path, ‘rb’) as stream:
    FileNotFoundError: [Errno 2] No such file or directory: ‘d:\\josh_python\\lib\\site-packages\\tensorflow_estimator-1.14.0.dist-info\\METADATA’

    Please suggest me sir

    • Avatar
      Jason Brownlee September 6, 2020 at 6:06 am #

      I believe for the latest version of Keras that TensorFlow is required.

      • Avatar
        Jyothsna September 6, 2020 at 12:11 pm #

        Sir, when I tried to install tensorflow it is giving an error.
        How to install it sir

        • Avatar
          Jason Brownlee September 7, 2020 at 8:24 am #

          Sorry to hear that, perhaps try posting or searching for your error on stackoverflow.com

  564. Avatar
    Amal September 11, 2020 at 1:01 am #

    Hi!
    When I tried to execute the python deep_versions.py command line I have got those errors:

    (base) PS C:\Users\Lenovo> python deep_versions.py
    theano: 1.0.4
    Traceback (most recent call last):
    File “C:\Users\Lenovo\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\platform\self_check.py”, line 75, in preload_check
    ctypes.WinDLL(build_info.cudart_dll_name)
    File “C:\Users\Lenovo\anaconda3\lib\ctypes\__init__.py”, line 364, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] Le module spécifié est introuvable

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import tensorflow
    File “C:\Users\Lenovo\AppData\Roaming\Python\Python37\site-packages\tensorflow\__init__.py”, line 28, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
    File “C:\Users\Lenovo\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\__init__.py”, line 49, in
    from tensorflow.python import pywrap_tensorflow
    File “C:\Users\Lenovo\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 30, in
    self_check.preload_check()
    File “C:\Users\Lenovo\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\platform\self_check.py”, line 82, in preload_check
    % (build_info.cudart_dll_name, build_info.cuda_version_number))
    ImportError: Could not find ‘cudart64_100.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive

    Could you please help me, I really need help!!

    • Avatar
      Jason Brownlee September 11, 2020 at 5:59 am #

      Sorry, I can’t offer advice on this issue, perhaps try searching/posting on stackoverflow?

  565. Avatar
    Rajtilak Bhattacharjee September 16, 2020 at 11:10 pm #

    The list of comments here is lengthier than the post, that itself says how much you are invested to your readers. I have learned a lot from your blog posts, and more than learning, I would say you inspired me like you had inspired thousand others. Kudos to you for that. I just came here to ask you, the update that the March 2017 update that you wrote, you meant Keras there and not Kears for Deep Learning, or is this something new?

  566. Avatar
    Anthony The Koala September 17, 2020 at 5:54 pm #

    Dear Dr Jason,
    I downloaded MiniConda3 which is a subset of Anaconda.
    Minconda3 has a terminal window.
    I open the terminal window to do a very basic conda operation.
    <pre
    Traceback (most recent call last):
    File "C:\miniconda3\Scripts\conda-script.py", line 11, in
    from conda.cli import main
    ModuleNotFoundError: No module named ‘conda’

    C:\Windows\system32>conda
    ‘conda’ is not recognized as an internal or external command,
    operable program or batch file.
    C:\Windows\system32>

    This was from a basic install. Don’t understand why I cannot invoke basic conda commands.

    Thank you,
    Anthony of Sydney

    • Avatar
      Jason Brownlee September 18, 2020 at 6:40 am #

      Perhaps try rebooting?

      • Avatar
        Anthony The Koala September 18, 2020 at 12:46 pm #

        Dear Dr Jason,
        Unfortunately rebooting did not work.

        When invoking conda under a miniconda powershell or miniconda command prompt the same messages described above were displayed.

        Result: I could not do conda.

        Consequence: I have never used conda for installing python packages. The only reason for installing conda was to install a package pystan which is ‘well known’ for problems in MS Win machines.

        Even when I had pycharm with miniconda3 did not solve the problem of installing pystan.

        Result: There may be other packages for bayesian analysis.

        Therefore: I won’t be concerned with a package that I rarely use and I have managed to succeed to install packages for a particular python installation.

        Result: I have had 99%+ success installing without conda.

        Other thing: If there are python packages that require a linux installation, I will be installing Win 10 and a Linux distribution. But don’t need that at the moment.

        Thank you
        Anthony of Sydney

  567. Avatar
    Craig Hurlbut September 19, 2020 at 8:06 am #

    Hi Jason, do you perform contract work for machine learning projects? I have a project that’s probably simple for you. I’d like to learn but have little time. Thank you.

    Craig
    Rochester, New York

  568. Avatar
    yitayew solomon September 25, 2020 at 6:45 pm #

    Dear jason i installed the following libraries for Neural machine translation (NMT), in order to practice based on your post English-Germany NMT by using some selected corpus by downloading from your blog link. while I’m loading the prepared sample corpus to memory and run the code I found the error below how can I fix it?

    Error:

    eng_tokenizer = create_tokenizer(dataset[:, 0])

    IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

    installed python libraries for NMT
    scipy: 1.5.0
    numpy: 1.19.1
    matplotlib: 3.2.2
    pandas: 1.1.0
    statsmodels: 0.11.1
    sklearn: 0.23.1

    Please help me.

  569. Avatar
    Kenan Wang October 9, 2020 at 3:32 pm #

    scipy: 1.5.0
    numpy: 1.19.1
    matplotlib: 3.3.1
    pandas: 1.1.3
    statsmodels: 0.11.1
    sklearn: 0.23.2

  570. Avatar
    Fainan El Sisi October 11, 2020 at 6:02 am #

    Scipy: 1.5.0
    Numpy: 1.19.1
    Matplotlib: 3.3.1
    Pandas: 1.1.3
    Statsmodels: 0.12.0
    Sklearn: 0.32.2

  571. Avatar
    Fainan El Sisi October 11, 2020 at 9:55 am #

    when installing keras using pip install keras the following error appear
    tensorflow 1.10.0 has reqirment setuptools <=39.1.0, but you'll have setuptools 40.2.0 whhich is incompatible
    what error did i do? and how can i solve the problem

    Thank you

    • Avatar
      Jason Brownlee October 12, 2020 at 6:36 am #

      I recommend installing TensorFlow v2.3 or higher.

  572. Avatar
    Fainan El Sisi October 12, 2020 at 5:00 am #

    Dear Jason Brownlee
    I install anaconda python 3.8 for windows and create a new python 3.5 environment on which environment i install tensorflow and keras

  573. Avatar
    Fainan El Sisi October 13, 2020 at 7:15 pm #

    Dear jason, thank you for quick reply, and i installed tensorflow v2.3 as you tell me, using pip install tensorflow_cpu-2.3.0-cp35-cp35m-win_amd64.whl. the result as shown

    Error: After October 2020 you may experience error when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

    We recommend you use –use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

    tensorflow 1.10.0 requires numpy=1.13.3, but you’ll have numpy 1.18.5 which is incompatible.

    tensorflow 1.10.0 requires setuptools<=39.1.0, but you'll have setuptools 50.3.0 which incompatible.
    tensorflow 1.10.0 requires tensorboard=1.10.0 but you’ll have tensorboard 2.3.0 which is incompatible.
    tensorboard 2.3.0 requires grpcio>=1.24.3, but you’ll have grpcio 1.14.1 which is incompatible.

    • Avatar
      Jason Brownlee October 14, 2020 at 6:15 am #

      Looks like you have some incompatibilities to resolve.

  574. Avatar
    Fainan El Sisi October 14, 2020 at 8:05 pm #

    Dear jason,
    Thank you for your quick reply and your help, can you tell me what can i do to solve this problem.

    Thank you very much

    • Avatar
      Jason Brownlee October 15, 2020 at 6:08 am #

      Perhaps you can change the version of one or more of your libraries?
      Perhaps you can try posting on stackoverflow?

  575. Avatar
    Chris Meakin October 17, 2020 at 3:52 pm #

    scipy: 1.5.0
    numpy: 1.19.1
    matplotlib: 3.3.1
    pandas: 1.1.3
    statsmodels: 0.12.0
    sklearn: 0.23.2

  576. Avatar
    techtim October 20, 2020 at 9:19 pm #

    I had to install tensorflow with PIP rather than conda but then was able to run deep_versions.py with the following result.

    theano: 1.0.4
    2020-10-20 11:13:03.257660: W tensorflow/stream_executor/platform/default/dso_lo
    ader.cc:59] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64
    _101.dll not found
    2020-10-20 11:13:03.278608: I tensorflow/stream_executor/cuda/cudart_stub.cc:29]
    Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.3.1
    keras: 2.4.3

    I guess it is OK to ignore this warning for now because I dont have a GPU setup on this machine.

  577. Avatar
    Raghu October 22, 2020 at 7:50 am #

    theano: 1.0.4
    tensorflow: 2.3.1
    keras: 2.4.3

  578. Avatar
    Francisco Gonçalves October 26, 2020 at 1:36 am #

    scipy: 1.5.0
    numpy: 1.19.1
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.0
    sklearn: 0.23.2

  579. Avatar
    Pau November 19, 2020 at 11:40 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

  580. Avatar
    Kaisen Yao November 20, 2020 at 9:31 am #

    theano: 1.0.4
    Traceback (most recent call last):
    File “D:\Kaisen\PhD\Machine learning\test\deep version.py”, line 6, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    I followed the instruction by not installing tensorflow because I am a windows user

    • Avatar
      Jason Brownlee November 20, 2020 at 1:05 pm #

      Perhaps try rebooting?
      Perhaps try installing tensorflow again?

  581. Avatar
    Sicney November 23, 2020 at 4:03 am #

    I had the same problem Kaisen Yao had by installing tf via conda install -c.

    Did it with pip install instead, seemed to work out. Got this as output:

    python deep_versions.py
    theano: 1.0.4

    2020-11-22 17:57:14.080538: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
    2020-11-22 17:57:14.080688: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

    tensorflow: 2.3.1
    keras: 2.4.3

    I don´t have CUDA for GPU, so this should work besides the error message.

    Could you confirm it ? tf documentation says tf should be installed via:

    conda create -n tf tensorflow
    conda activate tf

    But this creates an environment where everything else installed before (versions.py) is not installed.

    • Avatar
      Jason Brownlee November 23, 2020 at 6:18 am #

      Nice work.

      I don’t know about that error message, sorry. Perhaps you installed the GPU version of tensorflow by mistake?

  582. Avatar
    RUTUJA KALBHOR December 16, 2020 at 5:52 am #

    –>python versions.py
    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.1
    sklearn: 0.23.2
    theano: 1.0.4
    2020-12-16 00:15:31.000658: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2020-12-16 00:15:31.014310: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.4.0
    keras: 2.4.3

  583. Avatar
    RUTUJA KALBHOR December 16, 2020 at 6:48 am #

    Using Windows so first I used pip install tensorflow
    –>python versions.py
    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.1
    sklearn: 0.23.2
    theano: 1.0.4
    2020-12-16 00:15:31.000658: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2020-12-16 00:15:31.014310: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.4.0
    keras: 2.4.3

    But again I used conda install -c conda-forge tensorflow

    (base) C:\Users\admin1\Desktop\ML Lab>python versions.py
    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.1
    sklearn: 0.23.2
    theano: 1.0.4
    tensorflow: 2.3.0
    keras: 2.4.3

    Does it work same for Windows OS

  584. Avatar
    Fatimah Hussain December 18, 2020 at 5:22 am #

    Hi!
    I had this error pop up:
    (myenv) user@x86_64-apple-darwin13 ~ % python deep_versions.py
    theano: 1.0.4
    zsh: illegal hardware instruction python deep_versions.py
    (myenv) user@x86_64-apple-darwin13 ~ %

    Not sure what to do now.
    For reference, here is the deep_versions.py:

    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 December 18, 2020 at 7:20 am #

      Sorry, I have not seen that error before.

      Perhaps try posting on stackoverflow.

  585. Avatar
    Fatimah Hussain December 18, 2020 at 5:26 am #

    Also, when I try:

    (myenv) fatimahhussain@x86_64-apple-darwin13 ~ % conda update conda

    PackageNotInstalledError: Package is not installed in prefix.
    prefix: /Users/fatimahhussain/opt/anaconda3/envs/myenv
    package name: conda

    It gives me this error??

  586. Avatar
    Waqas December 20, 2020 at 9:17 pm #

    Is it tensorflow version independent?

  587. Avatar
    N December 22, 2020 at 1:17 pm #

    When I try to run ‘python deep_versions.py’ it gives me the error:
    python: can’t open file ‘deep_versions.py’ : [Errno 2] No such file or directory

    • Avatar
      Jason Brownlee December 22, 2020 at 1:38 pm #

      It looks like the file was not saved in the same directory where you are executing the command.

      Either change directory to where you saved the file or move the file to your current working directory.

  588. Avatar
    SuSa December 24, 2020 at 3:26 am #

    Dear Jason,

    Thanks to your step by step instructions, even though it was a long process, i finally installed everything needed for the ML environment in my system!! Horray!!!!
    Some issues with tensorflow. I did a pip install.

    (base) D:\>python versions.py
    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.5
    statsmodels: 0.12.1
    sklearn: 0.23.2

    (base) D:\>python deep_versions.py

    theano: 1.0.4
    2020-12-23 21:49:36.464940: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2020-12-23 21:49:36.468018: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.4.0
    keras: 2.4.3

    Thanks a ton!!
    SuSa

  589. Avatar
    Nehal Baig December 30, 2020 at 6:31 pm #

    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.5
    statsmodels: 0.12.1
    sklearn: 0.23.2

  590. Avatar
    Nehal Baig December 30, 2020 at 6:54 pm #

    theano: 1.0.4
    tensorflow: 2.3.0
    keras: 2.4.3

  591. Avatar
    RN January 7, 2021 at 5:47 am #

    A tutorial on how to setup (Python Environment for Machine Learning with Anaconda) on and keep updated an offline (no internet) workstation will be very beneficial.

  592. Avatar
    Jean Pierre January 11, 2021 at 12:07 am #

    Can you help me sir?
    I got the following message and I can not run the code.

    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.5
    Illegal instruction (core dumped)

    Regards

    • Avatar
      Jason Brownlee January 11, 2021 at 6:19 am #

      Sorry, I have not seen that error before.

      Perhaps try skipping theano and instead focus on tensorflow?

  593. Avatar
    Cat January 12, 2021 at 2:46 pm #

    pythonscipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.2.0
    statsmodels: 0.12.1

  594. Avatar
    maohong January 18, 2021 at 1:50 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

  595. Avatar
    Andrea January 21, 2021 at 9:46 am #

    Hello,
    Here is my output:

    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.2.0
    statsmodels: 0.12.1
    sklearn: 0.23.2

    theano: 1.0.4
    tensorflow: 2.2.0
    keras: 2.4.3

  596. Avatar
    Nasreen Babar February 3, 2021 at 6:08 pm #

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

    Hello Sir!
    Need help.
    I want to increase the accuracy of the dataset constructed. can you please suggest to me some ideas using different classifiers like the random forest, SVM, decision tree, and Gradient Boosted tree?
    Thanks in Advance

  597. Avatar
    Ron Johnson February 7, 2021 at 9:15 am #

    theano: 1.0.4
    tensorflow: 2.4.1
    keras: 2.4.3

    Thank You!

  598. Avatar
    Peter February 7, 2021 at 11:53 am #

    scipy: 1.6.0
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.2.1
    statsmodels: 0.12.1
    sklearn: 0.23.2

  599. Avatar
    Yosra Halim February 9, 2021 at 6:56 am #

    It goes smoothly….

    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.0
    sklearn: 0.23.2
    and theano-1.0.5

    until it comes to installing Keras, it generates the error:
    ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow

    I’m using Python v 3.8 , windows 10, I read the guidelines for installing tensorflow for windows, but still confused .

    • Avatar
      Jason Brownlee February 9, 2021 at 7:48 am #

      Well done on your progress!

      Perhaps try installing/updating TensorFlow first, then try Keras.

  600. Avatar
    Deepanshu February 10, 2021 at 6:48 pm #

    scipy: 1.6.0
    numpy: 1.19.5
    matplotlib: 3.3.3
    pandas: 1.2.0
    statsmodels: 0.12.2
    sklearn: 0.24.0
    theano: 1.0.5
    tensorflow: 2.4.1
    keras: 2.4.3

  601. Avatar
    Dean Pangelinan February 15, 2021 at 7:24 am #

    Hi, Jason!

    My version confirmation configuration was:

    scipy: 1.6.0
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.2.1
    statsmodels: 0.12.1
    sklearn: 0.23.2

    I hope that I’m doing this correctly.

  602. Avatar
    Dean Pangelinan February 15, 2021 at 7:38 am #

    Jason,

    Since we “only need one of Theano or TensorFlow to use Keras for Deep Learning”, is it safe to presume that we can comment out lines 2 & 3 of the file you have us create called “deep_learning.py”?

    Please advise.

    • Avatar
      Dean Pangelinan February 15, 2021 at 7:42 am #

      Correction: I meant the “deep_versions.py”, NOT “deep_learning.py”. (Rookie mistake!)

      And I ask because my results were:

      2021-02-14 12:38:39.716389: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
      2021-02-14 12:38:39.716694: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
      tensorflow: 2.4.1
      keras: 2.4.3

      I don’t have a GPU, to the best of my knowledge.

      Should I install Theano instead of (or in addition to) TensorFlow?

      Please advise.

      • Avatar
        Jason Brownlee February 15, 2021 at 8:15 am #

        No, either are fine for CPU only, I’d recommend going with TensorFlow if possible.

    • Avatar
      Jason Brownlee February 15, 2021 at 8:14 am #

      Yes.

  603. Avatar
    Cathy February 18, 2021 at 11:30 am #

    Hi Jason, when I do “python -V” in my command prompt, only “Python 3.7.6” appears and an Anaconda version is not attached to it, unlike your example: “Python 3.5.2 :: Anaconda 4.2.0 (x86_64)”. Do you know the reason as to why that is? Is it because I didn’t install Python with Anaconda?

    • Avatar
      Jason Brownlee February 18, 2021 at 1:20 pm #

      That version should be good enough, I recommend moving forward.

  604. Avatar
    Thanos Tsadiras February 18, 2021 at 7:59 pm #

    Hello, Jason…
    Thank you for all your help above.

    My version confirmation configuration was (using pycharm)

    :Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] on win32
    runfile(‘C:/Users/USER/PycharmProjects/untitled1/versions.py’, wdir=’C:/Users/USER/PycharmProjects/untitled1′)
    scipy: 1.5.2
    numpy: 1.19.2
    matplotlib: 3.3.2
    pandas: 1.1.3
    statsmodels: 0.12.0
    sklearn: 0.23.2

    They all look right.

    On the other hand, I get

    C:\Users\USER\anaconda3>python -V
    Python 3.8.5

    BUT
    C:\Users\USER\anaconda3>conda -V
    ‘conda’ is not recognized as an internal or external command,
    operable program or batch file.

    What might have been wrong?

    My Bests
    Thanos

  605. Avatar
    Aquaris February 21, 2021 at 6:45 am #

    Hopefully I did this correctly?

    scipy: 1.6.0
    numpy: 1.19.2
    matplotlib: 3.3.4
    pandas: 1.2.2
    statsmodels: 0.12.1
    sklearn: 0.23.2

  606. Avatar
    SULAIMAN KHAN February 23, 2021 at 10:15 pm #

    Hi Jason
    base) C:\Users\sulai>conda -V
    conda 4.5.4

    (base) C:\Users\sulai>
    (base) C:\Users\sulai>python -V
    Python 3.6.5 :: Anaconda, Inc.
    first I checked version Anaconda then I updated Anaconda.
    ############################
    scipy: 1.4.1
    numpy: 1.19.5
    matplotlib: 2.2.2
    pandas: 0.22.0
    statsmodels: 0.9.0
    sklearn: 0.19.1
    ######################

    • Avatar
      Jason Brownlee February 24, 2021 at 5:31 am #

      Well done, although perhaps update some of your libraries.

  607. Avatar
    Bernard February 27, 2021 at 5:36 am #

    scipy: 1.6.0
    numpy: 1.19.5
    matplotlib: 3.3.4
    pandas: 1.2.2
    statsmodels: 0.12.1
    sklearn: 0.23.2

    Hi Jason, I read your target audience are software engineers. I am not a software engineer but I am just about to start a Data Science and ML bootcamp with basic python/programming background and was asking if I am considered as part of your target audience as I look to dive into your processes and material. So in short I just want to know if the books and materials are designed for someone like myself.

    Thanks in advance

    • Avatar
      Jason Brownlee February 27, 2021 at 6:09 am #

      Thanks for sharing Bernard! It’s great to have you here as part of the ML Mastery community.

  608. Avatar
    Shankar Bhattarai February 27, 2021 at 6:12 pm #

    I got the following version
    scipy: 1.5.0
    numpy: 1.18.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.11.1
    sklearn: 0.23.1

    Does this work?

  609. Avatar
    Rithish February 27, 2021 at 11:22 pm #

    I have installed anaconda in the directory where the folder contains space. How could I change the path and solve the issue?

    • Avatar
      Jason Brownlee February 28, 2021 at 4:34 am #

      Perhaps you can uninstall anaconda and reinstall it?

  610. Avatar
    Suresh Kumar Madala March 5, 2021 at 7:14 pm #

    python :3.7.4

    scipy: 1.5.0
    numpy: 1.16.5
    matplotlib: 3.2.2
    pandas: 1.0.5
    statsmodels: 0.10.1
    sklearn: 0.21.3

  611. Avatar
    Maddy March 7, 2021 at 4:29 am #

    scipy: 1.6.0
    numpy: 1.19.2
    matplotlib: 3.3.4
    pandas: 1.1.3
    statsmodels: 0.12.0
    sklearn: 0.23.2

  612. Avatar
    Maddy March 7, 2021 at 4:37 am #

    theano: 1.0.5
    tensorflow: 2.4.0
    keras: 2.4.3

  613. Avatar
    hackerman March 12, 2021 at 1:50 am #

    Almost 4 years later!

    scipy: 1.6.1
    numpy: 1.19.2
    matplotlib: 3.3.4
    pandas: 1.2.3
    statsmodels: 0.12.2
    sklearn: 0.24.1
    theano: 1.0.4
    tensorflow: 2.3.0
    keras: 2.4.3

  614. Avatar
    Yishai Rasowsky March 14, 2021 at 11:37 pm #

    scipy: 1.6.1
    numpy: 1.19.2
    matplotlib: 3.3.4
    pandas: 1.2.3
    statsmodels: 0.12.2
    sklearn: 0.24.1

  615. Avatar
    Develux March 25, 2021 at 9:23 am #

    Thanks to all. Very useful information

  616. Avatar
    Lennart April 11, 2021 at 7:23 pm #

    Thanks for this useful information
    I have Windows so I tried to skip the tensorflow installation but it said keras requires tensorflow:

    >>theano: 1.0.4
    Traceback (most recent call last):
    File “C:\Users\Lennart\anaconda3\lib\site-packages\keras\__init__.py”, line 3, in
    from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
    ModuleNotFoundError: No module named ‘tensorflow’

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import keras
    File “C:\Users\Lennart\anaconda3\lib\site-packages\keras\__init__.py”, line 5, in
    raise ImportError(
    ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow
    <>theano: 1.0.4
    2021-04-11 11:11:00.746583: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2021-04-11 11:11:00.746794: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.4.1
    keras: 2.4.3
    <<

    Hope it works!

    • Avatar
      Jason Brownlee April 12, 2021 at 5:06 am #

      You can configure the older version of Keras to use Theano instead of tensorflow if you like.

  617. Avatar
    Lennart April 11, 2021 at 7:31 pm #

    The middle part of my comment wasn’t published because of the < symbols
    After the first output I installed tensorflow by the command "pip install tensorflow" and it gave me the second output
    Sorry for the chaos!

  618. Avatar
    Adrian April 15, 2021 at 6:21 am #

    I have it all installed, as I’m following along with https://machinelearningmastery.com/tutorial-first-neural-network-python-keras/ …but how do I start it? Lol!

  619. Avatar
    Ramadhan April 15, 2021 at 10:24 pm #

    I faced problem at 5th step

    • Avatar
      Jason Brownlee April 16, 2021 at 5:31 am #

      Sorry to hear that. Perhaps confirm you executed the previous steps correctly.

  620. Avatar
    Ramadhan April 15, 2021 at 10:25 pm #

    5. Confirm your SciPy environment.

  621. Avatar
    Mansi Keshri April 18, 2021 at 10:02 pm #

    Are these commands for downloading and updating libraries is also for windows?

    • Avatar
      Jason Brownlee April 19, 2021 at 5:51 am #

      Yes, the tutorial works for linux, macos and windows.

  622. Avatar
    Yonatan April 19, 2021 at 6:16 pm #

    scipy: 1.5.4
    numpy: 1.19.5
    matplotlib: 3.3.4
    pandas: 1.1.5
    statsmodels: 0.12.2
    sklearn: 0.24.1
    scipy: 1.5.4
    numpy: 1.19.5
    matplotlib: 3.3.4
    pandas: 1.1.5
    statsmodels: 0.12.2
    sklearn: 0.24.1

  623. Avatar
    Nosiba elhaj April 25, 2021 at 10:55 am #

    (base) D:\>python deep_versions.py
    theano: 1.0.4
    Traceback (most recent call last):
    File “deep_versions.py”, line 5, in
    import tensorflow
    ModuleNotFoundError: No module named ‘tensorflow’

    • Avatar
      Jason Brownlee April 26, 2021 at 5:34 am #

      The error suggests that TensorFlow is not installed on your system.

  624. Avatar
    Fidelis C. OBODOEZE May 2, 2021 at 2:18 pm #

    Thank you Dr. Jason.

    I want to use this medium to immensely thank you for your wonderful tutorials and guide so far in my new world of Machine Learning programming using Python, Anaconda, Miniconda, Conda, Spyder, Jupyter Notebook, Pip, Tensorflow, Keras, Theano, Matplotlib, Pandas, Numpy, Scikit-learn and so many of them.

    Previously, I wanted to use MATLAB 2018a to do my Data Modeling and Simulation for my PhD Thesis on ‘Air Quality Modeling using Machine Learning’ but when I found your step-by-step and concise tutorials and guide on Machine/Deep Learning using Python I changed my decision to switch to Python and now I am not regretting it.

    Next is to purchase your ebooks on topics describing different models of machine/deep learning.

    Thank you. You are the best.

    I am excited!

  625. Avatar
    F. M. Shakirullah May 3, 2021 at 9:07 pm #

    Very nice instruction! Thank you so much.

  626. Avatar
    F. M. Shakirullah May 8, 2021 at 8:37 pm #

    Hello dear, Is it must to install Python at first before Anaconda? – From Bangladesh

    • Avatar
      Jason Brownlee May 9, 2021 at 5:56 am #

      No. I believe python is part of the anaconda package.

  627. Avatar
    RKV June 2, 2021 at 10:54 pm #

    scipy: 1.4.1
    numpy: 1.18.1
    matplotlib: 3.1.3
    pandas: 1.0.1
    statsmodels: 0.11.0
    sklearn: 0.22.1

    is my output for versions.py

  628. Avatar
    Anon June 24, 2021 at 9:36 pm #

    Thanks for the help, I would like to comment on the website comment section to be short and if someone wants more comments better to load it with more.
    Jason Brownlee you are the best machine learning, deep learning teacher I have ever seen. Thank you again.

  629. Avatar
    y July 1, 2021 at 8:50 pm #

    please, i miss understane the difference between keras and tensorflow.

    • Avatar
      Jason Brownlee July 2, 2021 at 5:21 am #

      Keras is an overlay or wrapper for tensorflow.

      Keras runs on top of tensorflow.

  630. Avatar
    Omri Steinberg-Tatman July 3, 2021 at 3:28 am #

    I got most of it working, but when I run import theanos on python it gives me

    Traceback (most recent call last):
    File “/Users/omristeinberg-tatman/opt/anaconda3/lib/python3.8/site-packages/theano/gof/lazylinker_c.py”, line 76, in
    raise ImportError(
    ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

    and a bunch of other error code stuff. I tried reinstalling and restarting, any other ideas?

  631. Avatar
    Marc Crepeau July 23, 2021 at 10:16 am #

    scipy: 1.5.3
    numpy: 1.19.4
    matplotlib: 3.3.3
    pandas: 1.2.0
    statsmodels: 0.12.1
    sklearn: 0.24.0

  632. Avatar
    LienNT July 25, 2021 at 9:44 pm #

    scipy: 1.7.0
    numpy: 1.19.5
    matplotlib: 3.4.2
    pandas: 1.3.0
    statsmodels: 0.12.2
    sklearn: 0.24.2

    For deep_versions.py, I need to change the implement as below
    #tensorflow
    import tensorflow as tf
    print(‘tensorflow: %s’ % tf.__version__)
    # keras
    from tensorflow import keras
    print(‘keras: %s’ % tf.keras.__version__)
    and here is my output:

    tensorflow: 2.5.0
    keras: 2.5.0

    Thank you so much!

  633. Avatar
    Marvin L August 26, 2021 at 11:54 pm #

    Thank you very much!

    scipy: 1.6.2
    numpy: 1.20.3
    matplotlib: 3.4.2
    pandas: 1.3.2
    statsmodels: 0.12.2
    sklearn: 0.24.2

  634. Avatar
    Samson Oguntuwase October 3, 2021 at 1:38 am #

    scipy: 1.6.2
    numpy: 1.20.1
    matplotlib: 3.3.4
    pandas: 1.2.4
    statsmodels: 0.12.2
    sklearn: 0.24.1

  635. Avatar
    brajesh October 6, 2021 at 3:55 pm #

    I get the following error:

    #python deep_versions.py

    theano: 1.0.4
    tensorflow: 2.4.0
    Traceback (most recent call last):
    File “deep_versions.py”, line 8, in
    import keras
    File “/Users/Lady/opt/anaconda3/lib/python3.8/site-packages/keras/__init__.py”, line 25, in
    from keras import models
    File “/Users/Lady/opt/anaconda3/lib/python3.8/site-packages/keras/models.py”, line 19, in
    from keras import backend
    File “/Users/Lady/opt/anaconda3/lib/python3.8/site-packages/keras/backend.py”, line 36, in
    from tensorflow.python.eager.context import get_config
    ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’ (/Users/Lady/opt/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/context.py)

    • Avatar
      Adrian Tam October 7, 2021 at 2:52 am #

      That’s probably a version issue. In my case, I am having keras 2.6 and tensorflow 2.6. I think your keras is too old to work with tensorflow 2. Try to do “conda update” or “pip update”.

  636. Avatar
    jhleon October 18, 2021 at 2:28 pm #

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

    theano: 1.0.4
    tensorflow: 2.6.0
    keras: 2.6.0
    theano: 1.0.4
    tensorflow: 2.6.0
    keras: 2.6.0

  637. Avatar
    fire November 6, 2021 at 2:18 am #

    (base) C:\Users\fireg>python deep_versions.py
    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.4
    tensorflow: 2.3.0
    Traceback (most recent call last):
    File “deep_versions.py”, line 8, in
    import keras
    File “C:\Users\fireg\anaconda3\lib\site-packages\keras\__init__.py”, line 25, in
    from keras import models
    File “C:\Users\fireg\anaconda3\lib\site-packages\keras\models.py”, line 19, in
    from keras import backend
    File “C:\Users\fireg\anaconda3\lib\site-packages\keras\backend.py”, line 39, in
    from tensorflow.python.eager.context import get_config
    ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’ (C:\Users\fireg\anaconda3\lib\site-packages\tensorflow\python\eager\context.py)

    • Avatar
      Adrian Tam November 7, 2021 at 10:40 am #

      It seems your keras is too old to use tensorflow 2.3; doing “conda update keras” may help

  638. Avatar
    fire November 6, 2021 at 7:36 pm #

    (base) C:\Users\fireg>python versions.py
    scipy: 1.7.1
    numpy: 1.21.2
    matplotlib: 3.4.3
    pandas: 1.3.4
    statsmodels: 0.13.0
    sklearn: 1.0.1

  639. Avatar
    James November 26, 2021 at 3:50 am #

    Is this tutorial still likely to work?
    I tried with an up to date python/anaconda and couldn’t install theano on windows.
    I went to python 3.6 and whilst I could install theano and keras once I ran the deep_versions.py I get a whole load of text and not what everyone else is getting.
    Then I can’t seem to import from keras on your further tutorials.

    • Avatar
      Adrian Tam November 26, 2021 at 5:49 am #

      Skip theano. All else should work. It is unfortunate, but theano doesn’t seem to keep up with everyone else and I can consider that as obsoleted. Please just use tensorflow for Keras.

  640. Avatar
    Kaniz December 5, 2021 at 5:57 am #

    scipy: 1.7.1
    numpy: 1.20.3
    matplotlib: 3.4.3
    pandas: 1.3.4
    statsmodels: 0.12.2
    sklearn: 0.24.2

    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.5
    2021-12-05 00:47:28.703206: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2021-12-05 00:47:28.703463: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.7.0
    keras: 2.7.0

  641. Avatar
    Rei Am December 10, 2021 at 4:49 am #

    the command: pip install keras is installing the keras but when I want to import it, it isays:

    AttributeError: module ‘tensorflow.compat.v2.__internal__’ has no attribute ‘tf2’

    Is there any new update on Keras installation?

    • Avatar
      Adrian Tam December 10, 2021 at 7:27 am #

      If your keras is up-to-date it should be just loading tensorflow.keras
      Can you check (1) you installed tensorflow version 2.x and (2) you can “import tensorflow.keras”

  642. Avatar
    Rei Am December 10, 2021 at 5:05 am #

    Answer to myself:

    import keras is no more working. Keras is now a part of tensorflow:

    from tensorflow import keras

  643. Avatar
    Kaniz December 10, 2021 at 4:36 pm #

    scipy: 1.7.1
    numpy: 1.20.3
    matplotlib: 3.4.3
    pandas: 1.3.4
    statsmodels: 0.12.2
    sklearn: 0.24.2

    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.5
    2021-12-10 11:33:18.799123: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2021-12-10 11:33:18.828317: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.7.0
    keras: 2.7.0

    is it ok ? plz reply ..

    • Avatar
      James Carmichael December 21, 2021 at 11:52 pm #

      Hi Kaniz…Most likely if you using a personal laptop or desktop “PC”, you will have a CPU and not a GPU. In this case there will be no issue with your installation. For more information on the differences between CPUs and GPUs and their utilization in machine learning and AI, please refer to the following:

      https://www.intel.com/content/www/us/en/products/docs/processors/cpu-vs-gpu.html

  644. Avatar
    Kaniz December 11, 2021 at 1:37 am #

    scipy: 1.7.1
    numpy: 1.20.3
    matplotlib: 3.4.3
    pandas: 1.3.4
    statsmodels: 0.12.2
    sklearn: 0.24.2

    WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
    theano: 1.0.5
    tensorflow: 2.7.0
    keras: 2.7.0

  645. Avatar
    test February 1, 2022 at 5:58 pm #

    hey, this is test reply

  646. Avatar
    Arsen February 2, 2022 at 1:19 am #

    scipy: 1.7.3
    numpy: 1.20.3
    matplotlib: 3.5.0
    pandas: 1.3.5
    statsmodels: 0.12.2
    sklearn: 1.0.2

    conda install theano
    Collecting package metadata (current_repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: |
    Found conflicts! Looking for incompatible packages.
    This can take several minutes. Press CTRL-C to abort.
    failed

    UnsatisfiableError: The following specifications were found
    to be incompatible with the existing python installation in your environment:

    Specifications:

    – theano -> python[version=’>=2.7,=3.10,=3.8,=3.7,=3.6,=3.5,<3.6.0a0']

    Your python: python=3.9

    If python is on the left-most side of the chain, that's the version you've asked for.
    When python appears to the right, that indicates that the thing on the left is somehow
    not available for the python version you are constrained to. Note that conda will not
    change your python version to a different minor version unless you explicitly specify
    that.

  647. Avatar
    Hank March 6, 2022 at 1:52 am #

    theano: 1.0.5
    tensorflow: 2.4.1

    Traceback (most recent call last):
    File “/Users/hank/Desktop/NYCU/MB516/PersonalThesis/Thesiscode/deep_versions.py”, line 15, in
    import keras
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/__init__.py”, line 25, in
    from keras import models
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/models.py”, line 19, in
    from keras import backend
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/backend.py”, line 39, in
    from tensorflow.python.eager.context import get_config
    ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’ (/Users/hank/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/context.py)

  648. Avatar
    Hank March 6, 2022 at 1:53 am #

    theano: 1.0.5
    tensorflow: 2.4.1

    Traceback (most recent call last):
    File “/Users/hank/Desktop/NYCU/MB516/PersonalThesis/Thesiscode/deep_versions.py”, line 15, in
    import keras
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/__init__.py”, line 25, in
    from keras import models
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/models.py”, line 19, in
    from keras import backend
    File “/Users/hank/opt/anaconda3/lib/python3.9/site-packages/keras/backend.py”, line 39, in
    from tensorflow.python.eager.context import get_config
    ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’ (/Users/hank/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/eager/context.py)

    • Avatar
      James Carmichael March 6, 2022 at 1:05 pm #

      Hi Hank…Do you have a specific question that may be addressed to better assist you?

  649. Avatar
    Patrick T March 17, 2022 at 10:12 pm #

    Hi James, here is what I’ve got. What am I failing to do

    #from python versions.py command:

    scipy: 1.7.3
    numpy: 1.20.3
    matplotlib: 3.5.1
    pandas: 1.4.1
    statsmodels: 0.12.2
    sklearn: 1.0.2

    #from python deep_versions.py command:

    theano: 1.0.5
    2022-03-17 04:10:58.957687: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘libcudart.so.11.0’; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
    2022-03-17 04:10:58.957739: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    tensorflow: 2.8.0
    keras: 2.8.0

    • Avatar
      James Carmichael March 20, 2022 at 7:30 am #

      Hi Patrick…Did you copy and paste the code or type it into your editor?

      • Avatar
        Patrick March 26, 2022 at 7:59 pm #

        I typed the code into the editor and save it as .py file the run the “python deep_versions.py” command.

        So I used “conda install -c conda-forge keras” command and got this as a result:

        theano: 1.0.5
        tensorflow: 2.4.1
        keras: 2.4.3

        And all seems working well in ipython because I can import all 3 modules with no any error.

        • Avatar
          James Carmichael March 28, 2022 at 7:56 am #

          Great feedback Patrick. When I have an issue running Python locally, I try it in Google Colab to rule out possible incompatibility issues with my local installation.

  650. Avatar
    Ritu March 24, 2022 at 11:55 am #

    I am getting this error while installing theano.

    (base) C:\Users\RITU>conda install theano
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: C:\ProgramData\Anaconda3

    added / updated specs:
    – theano

    The following NEW packages will be INSTALLED:

    libgpuarray pkgs/main/win-64::libgpuarray-0.7.6-h2bbff1b_1
    libpython pkgs/main/win-64::libpython-2.1-py39haa95532_0
    m2w64-binutils pkgs/msys2/win-64::m2w64-binutils-2.25.1-5
    m2w64-bzip2 pkgs/msys2/win-64::m2w64-bzip2-1.0.6-6
    m2w64-crt-git pkgs/msys2/win-64::m2w64-crt-git-5.0.0.4636.2595836-2
    m2w64-gcc pkgs/msys2/win-64::m2w64-gcc-5.3.0-6
    m2w64-gcc-ada pkgs/msys2/win-64::m2w64-gcc-ada-5.3.0-6
    m2w64-gcc-fortran pkgs/msys2/win-64::m2w64-gcc-fortran-5.3.0-6
    m2w64-gcc-objc pkgs/msys2/win-64::m2w64-gcc-objc-5.3.0-6
    m2w64-headers-git pkgs/msys2/win-64::m2w64-headers-git-5.0.0.4636.c0ad18a-2
    m2w64-isl pkgs/msys2/win-64::m2w64-isl-0.16.1-2
    m2w64-libiconv pkgs/msys2/win-64::m2w64-libiconv-1.14-6
    m2w64-libmangle-g~ pkgs/msys2/win-64::m2w64-libmangle-git-5.0.0.4509.2e5a9a2-2
    m2w64-make pkgs/msys2/win-64::m2w64-make-4.1.2351.a80a8b8-2
    m2w64-mpc pkgs/msys2/win-64::m2w64-mpc-1.0.3-3
    m2w64-mpfr pkgs/msys2/win-64::m2w64-mpfr-3.1.4-4
    m2w64-pkg-config pkgs/msys2/win-64::m2w64-pkg-config-0.29.1-2
    m2w64-toolchain pkgs/msys2/win-64::m2w64-toolchain-5.3.0-7
    m2w64-tools-git pkgs/msys2/win-64::m2w64-tools-git-5.0.0.4592.90b8472-2
    m2w64-windows-def~ pkgs/msys2/win-64::m2w64-windows-default-manifest-6.4-3
    m2w64-winpthreads~ pkgs/msys2/win-64::m2w64-winpthreads-git-5.0.0.4634.697f757-2
    m2w64-zlib pkgs/msys2/win-64::m2w64-zlib-1.2.8-10
    mako pkgs/main/noarch::mako-1.1.4-pyhd3eb1b0_0
    pygpu pkgs/main/win-64::pygpu-0.7.6-py39h080aedc_1
    theano pkgs/main/win-64::theano-1.0.5-py39haa95532_1

    Proceed ([y]/n)? y

    Preparing transaction: done
    Verifying transaction: failed

    EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
    environment location: C:\ProgramData\Anaconda3

    • Avatar
      James Carmichael March 25, 2022 at 1:50 pm #

      Hi Ritu…I’m eager to help, but I just don’t have the capacity to help you setup or debug work workstation.

      Also, I am not an expert in debugging workstations and development environments.

      My material is generally intended for those that know their way around their own workstation and know how to install software.

      Check these tutorials for setting up your environment:

      How to Setup a Python Environment for Machine Learning and Deep Learning with Anaconda
      How to Install a Python 3 Environment on Mac OS X for Machine Learning and Deep Learning
      How to Create a Linux Virtual Machine For Machine Learning Development With Python 3
      If you continue to have problems, consider posting your question and issue to StackOverflow.

  651. Avatar
    William Rhoades June 22, 2022 at 9:45 pm #

    Should I abandon Anaconda??
    I am a new user who bought a couple of Jason books this week.
    Anaconda puts brand new Python into the root environment.
    Tensorflow and Keras don’t want new Python,
    I tried creating a Py35 environment, Finally Keras and Tensorflow would load into this environment but in my Jupyter notebook, any call to Tensorflow or Keras results in errors. The Scipy normal components can be called into the notebook without problem.
    I am concerned that parts of Anaconda can’t tell what environment I want.
    A conda shell just found new Python in the root env.
    Maybe Anaconda adds too many possibilities for a beginner. I will look to see if I can get going with just community Pycharm and hand loading my Python components after checking to see which Python the current Tensorflow wants.

    • Avatar
      James Carmichael June 23, 2022 at 10:47 am #

      Hi William…I would not recommend abandoning Anaconda. If you are not able to get it up and running quickly, I would also recommend that you give Google Colab a try as it does not depend upon your local computing resources.

  652. Avatar
    Meenakshi Ramesh Patel June 24, 2022 at 2:54 pm #

    scipy: 1.5.2
    numpy: 1.20.3
    matplotlib: 3.4.2
    pandas: 1.1.3
    statsmodels: 0.13.1
    sklearn: 1.0.1

    • Avatar
      James Carmichael June 25, 2022 at 6:41 am #

      Thank you for the feedback Meenakshi!

  653. Avatar
    Meenakshi Ramesh Patel June 24, 2022 at 6:02 pm #

    Collecting package metadata (current_repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: |
    Found conflicts! Looking for incompatible packages.

    Having this error while installing Tensorflow

    • Avatar
      James Carmichael June 25, 2022 at 7:09 am #

      Hi Meenakshi…You may want to investigate Google Colab while you are resolving your local environment issues.

  654. Avatar
    Ian Croll June 26, 2022 at 12:50 am #

    scipy: 1.7.3
    numpy: 1.21.5
    matplotlib: 3.5.1
    pandas: 1.4.2
    statsmodels: 0.13.2
    sklearn: 1.0.2

  655. Avatar
    Samin Hasan August 8, 2022 at 4:16 pm #

    I’m not seeing the line – ‘Using Tensorflow backend’

    My output is –

    tensorflow: 2.6.0
    keras: 2.6.0

    • Avatar
      James Carmichael August 9, 2022 at 9:52 am #

      Hi Samin…Is your Anaconda environment working for development of your machine learning models?

  656. Avatar
    Mina October 11, 2022 at 1:37 am #

    Hi, I am unable to import matplotlib. I get this error ImportError: DLL load failed while importing _imaging: The specified module could not be found. I have managed to import Theano, Tensorflow and Keras.

  657. Avatar
    Madan October 16, 2022 at 1:37 pm #

    These are my versions —> One more thing, the versions matter in implementing your code?
    scipy: 1.9.1
    numpy: 1.21.5
    matplotlib: 3.5.2
    pandas: 1.4.4
    statsmodels: 0.13.2
    sklearn: 1.0.2

  658. Avatar
    Charlene October 27, 2022 at 1:22 am #

    Hi, this is what I get
    scipy: 1.7.3
    numpy: 1.21.5
    matplotlib: 3.5.2
    pandas: 1.4.4
    statsmodels: 0.13.2
    sklearn: 1.0.2

  659. Avatar
    Charlene October 27, 2022 at 2:18 am #

    This is what I get, I do not understand the error message. Thanks for your help:

    theano: 1.0.5
    tensorflow: 2.4.1
    Traceback (most recent call last):
    File “/home/gaba/deep_versions.py”, line 8, in
    import keras
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/__init__.py”, line 20, in
    from keras import distribute
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/distribute/__init__.py”, line 18, in
    from keras.distribute import sidecar_evaluator
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/distribute/sidecar_evaluator.py”, line 22, in
    from keras.optimizers.optimizer_experimental import (
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/optimizers/__init__.py”, line 25, in
    from keras import backend
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/backend.py”, line 32, in
    from keras import backend_config
    File “/home/gaba/anaconda3/lib/python3.9/site-packages/keras/backend_config.py”, line 33, in
    @tf.__internal__.dispatch.add_dispatch_support
    AttributeError: module ‘tensorflow.compat.v2.__internal__’ has no attribute ‘dispatch’

  660. Avatar
    F. Ornelas December 20, 2022 at 5:52 am #

    Hi Jason: I did the installation but got a warning too for theano.
    theano: 1.0.5
    tensorflow: 2.11.0
    keras: 2.11.0

    WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain
    C:\Users\fermin.ornelas\Anaconda3\lib\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.

    I think someone else above got a similar error warning

  661. Avatar
    Bill Wilson February 2, 2023 at 1:42 am #

    scipy: 1.9.1
    numpy: 1.21.5
    matplotlib: 3.5.2
    pandas: 1.4.4
    statsmodels: 0.13.2

    • Avatar
      James Carmichael February 2, 2023 at 8:43 am #

      Thank you Bill for your feedback!

  662. Avatar
    Tom March 16, 2023 at 7:12 am #

    Thanks for the tutorial. I’ve followed this before without any problems. This time everything was fine up until the deep learning libraries. I installed Theano and Keras on Windows and ran the deep_versions.py. It was giving me an error that my SciPy version required my NumPy to be < 1.23.0. I tried to downgrade NumPy with python -m pip install numpy==1.22.0. Now I'm getting these errors when I run deep_versions.py:

    python deep_versions.py
    Traceback (most recent call last):
    File "C:\Users\tomho\anaconda3\lib\site-packages\theano\configparser.py", line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
    File "C:\Users\tomho\anaconda3\lib\configparser.py", line 781, in get
    d = self._unify_values(section, vars)
    File "C:\Users\tomho\anaconda3\lib\configparser.py", line 1152, in _unify_values
    raise NoSectionError(section) from None
    configparser.NoSectionError: No section: 'blas'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "C:\Users\tomho\anaconda3\lib\site-packages\theano\configparser.py", line 327, in __get__
    val_str = fetch_val_for_key(self.fullname,
    File "C:\Users\tomho\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 "C:\Users\tomho\deep_versions.py", line 2, in
    import theano
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
    from theano.scan_module import scan_opt
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
    from theano import tensor, scalar
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
    from theano.tensor import blas
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
    from theano.tensor.blas_headers import blas_header_text
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
    if not config.blas.ldflags:
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
    val_str = self.default()
    File “C:\Users\tomho\anaconda3\lib\site-packages\theano\configdefaults.py”, line 1284, in default_blas_ldflags
    blas_info = np.distutils.__config__.blas_opt_info
    AttributeError: module ‘numpy.distutils.__config__’ has no attribute ‘blas_opt_info’

    • Avatar
      James Carmichael March 17, 2023 at 9:30 am #

      Hi Tom…You may want to post your question on StackOverflow. In the mean time you should be able to run your models in Google Colab.

  663. Avatar
    prb June 29, 2023 at 4:13 pm #

    scipy: 1.10.1
    numpy: 1.24.3
    matplotlib: 3.7.1
    pandas: 1.5.3
    statsmodels: 0.13.5
    sklearn: 1.2.2

    thanks Tom!

  664. Avatar
    TamzinHorus July 17, 2023 at 5:25 am #

    These are the versions I get:

    (base) C:\Users\Romy\Documents>python versions.py
    scipy: 1.7.3
    numpy: 1.21.5
    matplotlib: 3.5.1
    pandas: 1.4.4
    statsmodels: 0.13.2
    sklearn: 1.0.2

    • Avatar
      James Carmichael July 17, 2023 at 6:40 am #

      Keep up the great work TamzinHorus! Let us know if we can help answer any questions you may have regarding this tutorial or other content.

  665. Avatar
    Tamzin July 18, 2023 at 2:25 am #

    Hi! Random question, but I tried replying with a part of the error code I got and then immediately was sent to a page saying I was blocked from the website? And it said to give you this id: Cloudflare Ray ID: 7e83d3f3bd9db8a0. The comment was about an error that happened, like theano and numpy weren’t compatible and I was asking for advice on it.

    • Avatar
      James Carmichael July 18, 2023 at 7:37 am #

      Hi Tamzin…What is the exact verbiage of the error you encountered? That will better enable us to assist you.

  666. Avatar
    Tamzin July 18, 2023 at 2:34 am #

    Thanks! I actually do have a question: Everything went well until I tried installing Theano. I first installed it but got an error, but then I did something I don’t remember and somehow it got resolved. However, when I try to run the code for the deep-version python file, it says that theano needs something from numpy that was removed in later versions. ChatGPT suggested updating Numpy, which I did, so it now is version 1.24.3, and I am using Windows 10. Should I update numpy to the version that still has that thing that Theano needs, or would that cause all kinds of other errors and incompatibilities (especially for the libraries you need for deep learning)?

    I would post the error here as well but it keeps sending me to a page saying I am blocked, so I’m trying it without adding it now.

  667. Avatar
    TamzinHorus July 18, 2023 at 11:55 pm #

    I unfortunately can’t paste the full error message because then it keeps sending me to the webpage saying I’m blocked, and I have no idea what part of my error message is causing it.
    But this (I think) is the most important part:

    AttributeError: module ‘numpy’ has no attribute ‘bool’.
    np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
    The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

    I’m thinking I could update numpy to 1.20.0, but would that likely cause all kinds of incompatibilities with other libraries needed for deep learning?

  668. Avatar
    Claude August 25, 2023 at 7:31 am #

    Here was my first output

    scipy: 1.9.1
    numpy: 1.21.5
    matplotlib: 3.5.2
    pandas: 1.4.4
    statsmodels: 0.13.2
    sklearn: 1.0.2

    I am so greatful for the simple and straightforward steps. You are amazing!

    • Avatar
      James Carmichael August 25, 2023 at 10:34 am #

      Thank you for you feedback Claude! We appreciate your support!

  669. Avatar
    Mike January 2, 2024 at 4:19 am #

    scipy: 1.11.1
    numpy: 1.24.3
    matplotlib: 3.7.2
    pandas: 2.0.3
    statsmodels: 0.14.0
    sklearn: 1.3.0

    • Avatar
      James Carmichael January 2, 2024 at 10:45 am #

      Thank you for your reply Mike! Let us know if you have any questions regarding our content.

  670. Avatar
    Rob January 18, 2024 at 4:45 pm #

    scipy: 1.11.4
    numpy: 1.26.2
    matplotlib: 3.8.0
    pandas: 2.1.1
    statsmodels: 0.14.0
    sklearn: 1.2.2

    tensorflow: 2.15.0
    keras: 2.15.0

    I’ve been getting a error when importing from tensorflow.keras.model
    from tensorflow.keras.model import Sequential
    gives me the error ‘No module named ”tensorflow.keras.model”’

    so I’m about to start downgrading the versions to see if that helps, will let you know

    • Avatar
      James Carmichael January 19, 2024 at 10:54 am #

      Thank you Rob for your feedback! Let us know what you find as you work through the issue.

  671. Avatar
    Rob February 10, 2024 at 4:41 pm #

    Couldn’t resolve the issue by downgrading, only went as far as 2.12 though. In 2.15, I can access the keras models directly from the keras namespace:

    import keras.model

    is that equivalent? I don’t really understand the relationship between tensorflow and keras

  672. Avatar
    Jack February 14, 2024 at 7:38 pm #

    scipy: 1.11.4
    numpy: 1.24.3
    matplotlib: 3.8.0
    pandas: 2.1.4
    statsmodels: 0.14.0
    sklearn: 1.3.0

    • Avatar
      James Carmichael February 15, 2024 at 10:29 am #

      Thank you for your feedback! Keep up the great work!

Leave a Reply