Anaconda Learning

Kenji Sato
-
anaconda learning

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.

Overview In this tutorial, we will cover the following steps: - Download Anaconda - Install Anaconda - Start and Update Anaconda - Update scikit-learn Library - 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. - 1. Visit the Anaconda homepage. - 2. Click “Anaconda” from the menu and click “Download” to go to the download page. - 3.

Choose the download suitable for your platform (Windows, OSX, or Linux): - Choose Python 3.5 - Choose the Graphical Installer 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. Installation is quick and painless. There should be no tricky questions or sticking points. 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. 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): 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. 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: 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: 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. - Anaconda Documentation - Anaconda Documentation: Installation - Conda - Using conda - Anaconda Navigator - Installing Theano - Install TensorFlow Anaconda - Keras Installation 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. Here is my output after installation: theano: 0.8.2 tensorflow: 1.0.1 Using TensorFlow backend. keras: 1.2.2 Very nice! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.0.0 Using TensorFlow backend. keras: 2.0.3 Very nice work Nitin. theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 0.12.1 Using TensorFlow backend. keras: 2.0.5 Nice work Shirley.

How can I install wordcloud and gensim in python 3.7 i saw this “syntax invalid syntax What did you type and where did you type it? sir Jason im very new about machne learning please guide me how cani started thank you! My best advice for getting stared is right here: https://machinelearningmastery.com/start-here/#getstarted 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 Perhaps ignore these warnings and focus on using the tensorflow backend? 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.

I recommend this process to work through your problem systematically: https://machinelearningmastery.com/start-here/#process scipy: 1.1.0 numpy: 1.15.2 matplotlib: 3.0.0 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.20.0 Well done! I m using windows and I installed both theano and TensorFlow on my PC would that cause any problem? 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.

One of the amazing documentation on Machine Learning. Thanks a lot. Thanks Deepak. theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.3.0 Using TensorFlow backend. keras: 2.0.8 Great work Dustin! 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 Nice work! tensorflow: 1.1.0 /anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters Using TensorFlow backend. keras: 2.2.0 Well done!

/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 Thanks Jeff, perhaps statsmodels was removed from a recent release of Anaconda? You can install it via the conda command or via pip.

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. Thanks for sharing!

/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 Perhaps your system has more than one version of Python installed? I have seen this many times with readers on Linux or Mac. did you solved it? i have the same problem theano: 1.0.3 tensorflow: 1.11.0 Using TensorFlow backend. keras: 2.2.4 Well done! (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 Well done! 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 Nice work. You can ignore the warning for now perhaps. 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 Well done! 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 Well done! 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. Well done. Perhaps try updating it? 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 Nice work! scipy: 1.5.2 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Well done! Command line is not working for Windows user. Where i can find command for windows?

Thx It has been more than a decade since I have used Windows. Maybe it’s called command prompt or terminal? It’s okay Mr. Jason. I found it already. Thx Glad to hear it Nico. you can try to use command prompt (cmd.exe) or alternatively use git-bash. it’s a more versatile version of cmd Have you tried adding the Python path in the environment variables ? 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.

Same Consider using Keras with Theano, everything will work perfectly. To use Keras, you only need TensorFlow OR Theano. If you have installed Theano, you can start using Keras. conda install python=3.5 and it is successfully working on that. Thanks for the tip Harsha. 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’ Sorry Steven, I have not seen this error.

try: conda install –force html5lib and then pip install keras 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 Consider trying this tutorial and confirm your Keras environment works correctly: https://machinelearningmastery.com/tutorial-first-neural-network-python-keras/ Installing additional modules mingw and libpython appear to resolve this issue on Winx64 conda install mingw libpython ref: http://stackoverflow.com/questions/40542214/warning-theano-configdefaults-g-not-detected-theano-will-be-unable-to-exe Thanks for the note and link James. It would be great if you add xgboost.

It complete all necessary things. Great suggestion Alex! Thanks. 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, . Well done Thrinadh! 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 Very nice work! Please do I need internet connection to set up virtual environment?

I don’t have tutorials on setting up a virtual environment. Perhaps post your question to stackoverflow. How to install tensorflow on windows?? 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? Consider installing Keras 1.2.2 instead that will work with tensorflow 1.0.

Keras 2.0 requires tensorflow 1.0.1+ For example: 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. Perhaps try running from the command line. Editors and notebooks often cause or hide errors. theano: 0.8.2.dev-901275534cbfe3fbbe290ce85d1abf8bb9a5b203 tensorflow: 1.0.0 Using TensorFlow backend. keras: 2.0.0 Very nice victor!

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 Looks like you do not have Theano installed.

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 It looks like you do not have Theano installed.

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. Nice, you might be able to ignore the warnings for now. Thank you (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’ 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 scipy: 0.18.1 numpy: 1.11.3 matplotlib: 2.0.0 pandas: 0.19.2 statsmodels: 0.6.1 sklearn: 0.18.1 Very nice!

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* 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. 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 Maybe Jason could include it under the Further Reading section? Thanks Clark. 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> Very nice Jefferson!

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? Hi Ram, to use Kease you only need Theano OR TensorFlow. If you can install Theano, then you can use Keras. scipy: 0.18.1 numpy: 1.11.3 matplotlib: 2.0.0 pandas: 0.19.2 statsmodels: 0.6.1 sklearn: 0.18.1 Very nice Richard!

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 Very nice Richard! 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 Thanks for the advice Reinhard. 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 Nice Laura! tensorflow:xtensor installed on windows 7 , is it ok Great work! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 0.11.0 Using TensorFlow backend. keras: 2.0.3 Well done John! 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. Nice work!

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’ You only need Theano OR TensorFlow for deep learning with Keras, not both. You can comment out the line that checks the TensorFlow version. You can update Keras to use Theano by editing the config file, see here: https://machinelearningmastery.com/introduction-python-deep-learning-library-keras/ I as able to get through your tutorial without issues even though I could not install Tensorflow Great work PJ!

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

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! You don’t need tensorflow and theano. Just comment out the import and check of tensorflow. 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 Great work Trang! 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? Comment out that line if you do not have TF installed. What does that mean sir? Comment out the line that imports tensorflow and that prints the tensorflow version if you do not have tensorflow installed. 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$ Well done Shai. theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.0.0 Using TensorFlow backend. keras: 2.0.4 Great work Ibrahim! scipy: 0.18.1 numpy: 1.11.3 matplotlib: 2.0.0 pandas: 0.19.2 statsmodels: 0.6.1 sklearn: 0.18.1 Great work! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.0.0 Using TensorFlow backend. keras: 2.0.4 Nice! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.4 Very nice Paul. 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! Very nice! scipy: 0.18.1 numpy: 1.11.3 matplotlib: 2.0.0 pandas: 0.19.2 statsmodels: 0.6.1 sklearn: 0.18.1 Very nice rodrigo! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.0.0 Using TensorFlow backend. keras: 2.0.4 Very nice Vinay! why install keras using pip rather than conda ? I found it easier. Were you able to easily install Keras using conda? 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 Very nice Asif!

def load doc_(“Filename”): sir i don’t understand which file name i use? 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 Very nice Tomasz! Thanks for the link for windows users (an area I know very little about). theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 0.12.0-rc0 Using TensorFlow backend. keras: 2.0.4 Very nice! 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. Thanks! Nice work Juan. theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.4 Very nice work Mahdis! 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″ Sorry, I have not seen this error before. Perhaps post to Anaconda support or stackoverflow? I got: theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.2.0-rc2 Using TensorFlow backend. keras: 2.0.4 thanks so much!!!! Very nice Maria! Thank You!!! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.2 Very nice Saswati! theano: 0.9.0 tensorflow: 1.2.0-rc2 Using TensorFlow backend. keras: 2.0.4 Thanks Jason! Very nice Ankit! 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’ >>> I’m sorry to hear that. Perhaps you need to re-open your terminal after anaconda was installed? 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.

You can ignore those warnings for now unless you want to dive into compiling tensorflow from scratch on your system (not recommended). I would create a python 3.5 (anaconda3) program executable, please how to do it? Sorry, I cannot help you with this. python deep_versions.py theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.5 Nice work daveg!

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! Sorry, I have not seen this error, consider posting to stackoverflow or contacting anaconda support?

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 That does not look, sorry to hear that. Perhaps try posting to the theano user group or stack overflow? 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) That is odd.

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 Great work Tushar!

scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Very nice Candida. scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Very nice! 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 Well done Sana! 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> Consider checking your internet connection. 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 🙂 Well done. Thanks. Nice tutorial.. Thanks Tom. Thanks!

This helped me SOOO much. 🙂 I’m glad to hear that. 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 Glad to hear you got there Joel! >>> matplotlib: 2.0.2 >>> numpy: 1.12.1 >>> pandas: 0.20.1 >>> scipy: 0.19.0 >>> sklearn: 0.18.1 >>> statsmodels: 0.8.0 $ 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 Very nice! 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’ See this tutorial for installation on OS X (that I use): https://machinelearningmastery.com/install-python-3-environment-mac-os-x-machine-learning-deep-learning/ Soory I gort a step. et me retry 😉 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’ theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.6 Very nice Matty!

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 Very nice Allegra. 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 Very nice Gentiana, well done!

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 Sorry to see that you are having an error. Perhaps post your question to stackoverflow? Hi More from me: theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.6 Well done Allegra! 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. Great tips, thanks for sharing Athenagoras! Good instructions and worked smmothly for me. Thanks. Thanks Alfred, I’m glad to hear that! 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 Thanks for sharing Shuan. Nice work too by the way! 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 Sorry, I don’t know a thing about windows. I would recommend posting to stack overflow. 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. 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 Well done! 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. There may be, I don’t know. You could use AWS instead: https://machinelearningmastery.com/develop-evaluate-large-deep-learning-models-keras-amazon-web-services/ 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 Nice work Mac!

Awesome stuff Jason Thanks, I hope it helped. 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> Very nice Nelson! tensorflow: 1.2.0 Using TensorFlow backend. keras: 2.0.6 TANKS VERY MUCH! Great work!

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! Nice work Dave! What was the painful part? >>> 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 >>> Well done Chenin! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.2.1 Using TensorFlow backend. keras: 2.0.6 Nice work! 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 Open the command line and type: This will open the python interpreter. 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 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 Nice work Jonas! scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Nice work Nuibb! 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.

Sorry, I don’t have any good ideas. Consider posting to stack overflow? Thank you anyway. I posted my question to stack overflow before asking here (but didn’t get any answer so far). Sorry Chriss, I am not an expert at debugging workstations. Perhaps it might be worth contacting the Anaconda people? 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 Nice work Chris!

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. Thanks Shay. 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) Nice! You can ignore the warnings for now. theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.2.1 Using Theano backend.

keras: 2.0.2 Well done Dawit! 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 Try running code from the command line, perhaps your IDE or notebook is causing faults (they often do!) 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. 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)) Well done Mayank! Thanks for the tip. Dear Jason, your articles are best!! Is there any flag in keras that is used to force keras to use either GPU or CPU No.

Use of CPU/GPU is configured in the underlying math library (theano or tensorflo). scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 sklearn: 0.18.1 statsmodels: 0.8.0 Great work Adarsh! 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 Well done Adrian! 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 Great work Adi. scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Well done Geoff!

theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.2.1 Using TensorFlow backend. keras: 2.0.7 Nice one Geoff! Ready for deep learning. 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 Well done, I’m glad to hear that. 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! Well done Emil! 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 Well done Cesar! 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 Well done rajat bansal! 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. Yes it does.

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? I’ve restarted my cmd after installing Anaconda as suggested earlier in this thread: https://machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda/#comment-402177 Nice one! Perhaps try rebooting your system? 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? It looks like numpy might not be installed, or not installed correctly?

scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.19.0 Nice work! —————- 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. It looks like keras might not be installed or not installed correctly Try reinstalling? Try rebooting? theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.3.0 Using TensorFlow backend. keras: 2.0.8 Great work!

Thank you so much for this detailed help You’re welcome. 😀 scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Great work Vlad! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.3.0 Using TensorFlow backend. keras: 2.0.8 WOOOHOOO Very nice! 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 😉 Nice work Marco! This might be a good place to start: https://machinelearningmastery.com/start-here/#deeplearning I’ve got a traceback just for doing the imports. when trying to import keras, python returns. “cannot import name utils” That is odd. Perhaps confirm that you have everything installed. nvm, I just installed everything in a conda virtual enviroment and worked smooth!

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? Great work. Not sure, perhaps try upgrading keras? 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 Great work Arelis! 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’ 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 Great work, well done! I was able to get rid of it by “conda install -c conda-forge keras” and that’s it. Thank you it worked theano: 0.9.0 tensorflow: 1.3.0 Using Theano backend. keras: 2.0.6 Very nice Nathan. 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: […] Thanks Jonathan, I really appreciate the tips! I hope that they help other Windows users. 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$ Well done Arelis! scipy: 0.18.1 numpy: 1.13.3 matplotlib: 2.0.2 pandas: 0.20.3 statsmodels: 0.6.1 sklearn: 0.19.0 Great work Vladimir! 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 Great work! 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 Great work Peter! Everything went smooth: theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.3.0 Using TensorFlow backend. keras: 2.0.8 Very nice! 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 Great work Jose! 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! I’m glad to hear that it worked! Awesome article . Yes Anaconda is one solution for all machine learning tasks . Thanks. scipy 0.19.1 numpy 1.13.1 matplotlib 2.0.2 pandas 0.20.3 statsmodels 0.8.0 sklearn 0.19.0 Great work! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 Using Theano backend. keras: 2.0.8 Great work! Thank you,, very nice tutorial.. Thanks! 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! Sorry, I don’t know about this warning. Perhaps try a search or even a post to StackOverflow?

I do have an OS X specific tutorial here that may help: https://machinelearningmastery.com/install-python-3-environment-mac-os-x-machine-learning-deep-learning/ 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. Well done Daniel! ?>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 Well done Robert! ?>python lib_version.py theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.2.1 Using TensorFlow backend. keras: 2.0.8 Great! 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 Well done! 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 Well done Vladimir! 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 Great work! And thank you very much for the great helpful posts!

You’re welcome. 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 Nice work! Thanks a lot jason! You’re welcome. 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. You might need to reconfigure Keras to use Theano instead of the default TensorFlow. See the config file in ~/.keras/keras.json. 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.1.0 Very nice. Well done! theano: 0.9.0 tensorflow: 1.3.0 Using TensorFlow backend. keras: 2.1.1 Well done Ankush! 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″ You might have a permissions issue on your machine? scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Great work John!

scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Nice work sona! 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. Sorry, I cannot spec this homework for you.

scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Nice work David! 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. I use wordpress. Good luck with your blog! 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 Well done! 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 I’m sorry to hear that, I don’t have any good ideas.

Perhaps post the error on StackOverflow? 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 Thanks for sharing. 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 Very nice! theano: 0.9.0.dev-unknown-git tensorflow: 1.4.0 Using TensorFlow backend. keras: 2.0.8 Great work! Hi Jason, having trouble with installing scikit learn.

getting a syntax error: invalid syntax Ensure you are on the command prompt and not in the Python REPL. 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? Perhaps try installing TensorFlow instead? 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! Well done! 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?

Yes, I believed pip was kept more up to date, you can use anything you wish. 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 Well done! theano: 0.9.0.dev-unknown-git tensorflow: 1.4.0 keras: 2.0.8 Well done! 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 Well done! scipy: 0.19.1 numpy: 1.13.1 matplotlib: 2.0.2 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.0 Well done Joel!

scipy: 0.18.1 numpy: 1.11.1 matplotlib: 1.5.3 pandas: 0.18.1 statsmodels: 0.6.1 sklearn: 0.17.1 Well done! 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 Well done Aaron! 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 statsmodels: 0.8.0 Well done! scipy: 0.19.1 numpy: 1.13.1 matplotlib: 2.0.2 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.0 Nice work!

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 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? 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 Nice work! Thank you Jason for such a comprehensive writing. MachineLearningMastery truely making marks in creating masters of machine learning. You’re welcome, I’m glad it helps. 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 Well done! 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. Thanks and well done Lynard! Hang in there. 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. Perhaps use Theano instead? 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!@#. 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? 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 😛 Hang in there! 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 I think it will be fine.

If you’re worried, I’d recommend using AWS: https://machinelearningmastery.com/develop-evaluate-large-deep-learning-models-keras-amazon-web-services/ 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 Well done! 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 I recommend using a text editor and running Python files on the command line. scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Very nice! 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 I don’t know about downloading twiter hashtags sorry. 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 And after some grappling: theano: 1.0.1 tensorflow: 1.4.0 Using TensorFlow backend. keras: 2.1.2 …phew. You made it! Nice work! 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 Great work! 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. Are you running code from the command line? Your suggestions for working with NLP – Is it better to use Spacy or scikit or textblob. Pls suggest It depends on your project goals.

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 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> Looks like there may be issues with your installation. Perhaps try posting your error to stackoverflow? 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 Thanks for sharing! thanks!!!!!!! It works to me as well. Thanks!! 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 Well done! First Thanks a lot for the good Steps. theano: 1.0.1 tensorflow: 1.4.0 keras: 2.1.2 Well done!

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 Nice, ignore Theano and stick to tensorflow then. Is it work if I use python 2.7 version? Yes, in most cases. 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 Perhaps skip Theano?

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 What is the problem? It looks fine. 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’ >>> Well done!

at the last line ,”the batch file can not be found ” dose not make any problem? thanks alot I have not seen that before, sorry. 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 Well done! 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 Well done! 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!!!! Well done! 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’ Perhaps tensorflow has not been installed? 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 Thanks for sharing! 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’ 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. I instal tensorflow under anaconda as indicated above but the same problem: ModuleNotFoundError: No module named ‘tensorflow’ I do not know where the problem The error suggests tensorflow is not installed or is installed but is not available in the python environment you have started.

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. Well done, thanks for sharing your experience. 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 Well done! 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? Sorry, I have not seen this error. Perhaps try searching/posting on stackoverflow? 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.

Perhaps try posting on stackoverflow? 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? Nice work! Yes, just one of tensorflow or theano is required.

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 Very nice! 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.. I’m sorry to heat that, I have not seen this error. Perhaps try searching/posting on stackoverflow?

Yeah Im getting the same thing! I am getting the same error scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Nice work! $ 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 Well done! 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. Thanks Timmy! $ 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 Well done! 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! Well done! 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? Sorry, I have not used windows. 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. GPU support only works with nvidia video cards as far as I know and all the macs I’ve owned come with radeon (or something).

I recommend dev/spot checking on the workstation and running large models on the GPU on AWS: https://machinelearningmastery.com/develop-evaluate-large-deep-learning-models-keras-amazon-web-services/ 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 Well done! 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 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.

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 tonp.floating is deprecated. In future, it will be treated asnp.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__) Nice work! You can ignore those warnings I believe.

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.

I’m sorry to hear that. Perhaps try searching/posting your error on stackoverflow? 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 Well done! theano: 1.0.1 Using Theano backend. keras: 2.1.4 Well done. scipy: 1.0.0 numpy: 1.14.0 matplotlib: 2.1.2 pandas: 0.22.0 statsmodels: 0.8.0 sklearn: 0.19.1 Well done! theano: 1.0.1 C:\XXXXX\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float tonp.floating is deprecated.

In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.4.0 Using TensorFlow backend. keras: 2.1.4 Nice one! 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” Thanks for the tip! 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? Ouch. TensorFlow looks broken. Perhaps forget TensorFlow and use Keras with Theano? I face the Same Problem, any solutions found ? please share.

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.

Sorry, I have not seen this error, perhaps try posting your error to stackoverflow? 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. 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 Well done! I got scipy: 1.0.0 numpy: 1.13.3 matplotlib: 2.2.0 pandas: 0.22.0 Nice work!

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 Never mind! Fixed! Glad to hear it. Oh dear. Does not look good.

I have not seen this, but perhaps try Theano instead of TensorFlow? 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. Perhaps try a reboot? 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 Perhaps try via conda? Simple…Awesome… Thanks. 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. Sorry, I have not seen this error. Perhaps post on stackoverflow?

(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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.5.0 Using TensorFlow backend. keras: 2.1.5 Well done! You can ignore the warning for now. 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 tonp.floating is deprecated.

In future, it will be treated asnp.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.

>>> Perhaps just use TensorFlow instead? scipy: 1.0.0 numpy: 1.14.0 matplotlib: 2.1.2 pandas: 0.22.0 statsmodels: 0.8.0 sklearn: 0.19.1 Well done! Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: – thean Current channels: – https://repo.anaconda.com/pkgs/main/win-64 – https://repo.anaconda.com/pkgs/main/noarch – https://repo.anaconda.com/pkgs/free/win-64 – https://repo.anaconda.com/pkgs/free/noarch – https://repo.anaconda.com/pkgs/r/win-64 – https://repo.anaconda.com/pkgs/r/noarch – https://repo.anaconda.com/pkgs/pro/win-64 – https://repo.anaconda.com/pkgs/pro/noarch – https://repo.anaconda.com/pkgs/msys2/win-64 – https://repo.anaconda.com/pkgs/msys2/noarch Sorry to hear that.

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

Perhaps try setting the variable as suggestion in the error? theano: 0.9.0.dev-unknown-git tensorflow: 1.7.0 keras: 2.1.5 Well done! 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? I don’t know sorry. Perhaps try searching/posting on stackoverflow. Sir I am unable to update scikit learn library I tried as you instructed but it shows syntax error please resolve Thanks in anticipation I’m sorry to hear that, perhaps try posting on stackoverflow?

I am not an expert at debugging workstations. 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 Well done! can i inatall tensorflow with win7 32 bit I don’t know sorry. Perhaps try? Perhaps search or post stackoverflow? 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 Well done!

import is not recognised as internal or external command The code must be saved into a file with a .py extension and run as follows: 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. Well done! I have material on LSTMs for NMT (neural machine translation), but not CNNs, sorry. Try google scholar?

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! Hang in there. Sometimes you have to go deep in google scholar. Maybe even ping some academics on related papers. 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 Well done!

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 tonp.floating is deprecated. In future, it will be treated asnp.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 Well done! 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……. Thanks for the suggestion.

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 Well done! scipy: 0.17.1 numpy: 1.11.1 matplotlib: 1.5.1 pandas: 0.18.1 statsmodels: 0.6.1 sklearn: 0.17.1 Well done!

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

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') 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. Thanks for sharing. Another gotcha is to never have filenames that match the name of a module or function that you are importing.

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? I don’t know much about it sorry. tensorflow: 1.8.0 Using TensorFlow backend. keras: 2.1.6 theano: 1.0.1 tensorflow: 1.8.0 keras: 2.1.6 Good work. 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 Well done for getting it installed.

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’ Sorry I have not seen this error, perhaps try posting on stackoverflow? scipy: 1.0.0 numpy: 1.14.0 matplotlib: 2.1.2 pandas: 0.22.0 statsmodels: 0.8.0 sklearn: 0.19.1 Well done! 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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .I updated h5py from 2.7.8 to 2.8.0rc1, using: pip install h5py==2.8.0rc1 Very nice! Thanks for your tutorials, they are incredibly well written and useful! Thanks Peter. theano: 1.0.1 tensorflow: 1.8.0 keras: 2.1.6 Using TensorFlow backend. Nice work!

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 Perhaps check on stackoverflow?

you can solve this with either the following: conda install mkl=2017 *or* conda install mkl=2018 Depending on the error message scipy: 1.0.0 numpy: 1.14.0 matplotlib: 2.1.2 pandas: 0.22.0 statsmodels: 0.8.0 sklearn: 0.19.1 Well done! 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 Well done!

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. I recommend using this process to work through your problem: https://machinelearningmastery.com/start-here/#process 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 Well done! 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? I’m not sure, perhaps try it. 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 Well done!

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 Perhaps you can ignore these message and use the libraries directly? you can install them using pip, e.g.: pip install msgpack 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() I’m sorry to hear that, perhaps try searching/posting your error on stackoverfolow? scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! 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. 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 Well done! Thank you very much! this tutorial really helps me a lot! I’m glad to hear that.

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 tonp.floating is deprecated. In future, it will be treated asnp.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 Well done! Great tutorial! Thanks. C:\Users\TOSHIBA\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float tonp.floating is deprecated. In future, it will be treated asnp.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 Well done!

theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.2.0 Nice work! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Nice work! 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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.8.0 Using TensorFlow backend. keras: 2.2.0 Well done Christian.

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 Well done! 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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters Using TensorFlow backend. keras: 2.2.0 Thank you very much!

Well done! scipy: 0.19.0 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.1 statsmodels: 0.8.0 sklearn: 0.18.1 Nice work. 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. Perhaps post on stackoverflow?

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 Well done! 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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.8.0 Using TensorFlow backend. keras: 2.2.0 Great work!

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 tonp.floating is deprecated. In future, it will be treated asnp.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 I have some suggestions here: https://machinelearningmastery.com/faq/single-faq/why-does-the-code-in-the-tutorial-not-work-for-me My outputs: scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 sklearn: 0.19.1 Very nice! My output from deep_versions: Using TensorFlow backend. theano: 1.0.2 tensorflow: 1.8.0 keras: 2.2.0 Excellent! 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.

I don’t use it or know about it sorry. I recommend writing code in a text editor and running from the command line: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line anaconda and python is installed on win8.1, but scipy: no module That is very odd. Perhaps you have 2 versions installed somehow? tensorflow: 1.9.0 Using TensorFlow backend. keras: 2.2.0 Well done! 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 tonp.floating is deprecated.

In future, it will be treated asnp.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 If you have TensorFlow, you can probably skip Theano.

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 Well done! 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 Perhaps try skipping Theano and try TensorFlow instead? Very nice! Thanks. 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 Well done! scipy: 0.18.1 numpy: 1.15.0 matplotlib: 2.0.0 pandas: 0.23.4 statsmodels: 0.6.1 sklearn: 0.18.1 Well done! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done!

theano: 1.0.2 /anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.9.0 Using TensorFlow backend. keras: 2.2.2 Excellent. 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 Well done! 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 Well done!

Thank you Sir! 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? Ouch perhaps post to stackoverflow? Or just use TensorFlow instead? 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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.10.0 Using TensorFlow backend. keras: 2.2.2 Nice work! 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. Well done!

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. This post will show you how: https://machinelearningmastery.com/load-machine-learning-data-python/ 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 tonp.floating isdeprecated. 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 Perhaps you can ignore the warning? 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. Well done Manny! 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 Well done Michael! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Nice work! >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 >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 tonp.floating is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type .from ._conv import register_converters as _register_converters tensorflow: 1.10.0 Using TensorFlow backend. keras: 2.2.2 Well done Matthew! theano: 1.0.2 tensorflow: 1.4.0 keras: 2.2.2 All installed using pip3 instead of conda. Well done! 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! Sorry to hear that, did the above tutorial help? 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 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 >>> Copy the code into a new file named versions.py and run it from the command line as: python versions.py 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 Ouch, perhaps post to stackoverflow? Or perhaps just use Theano for now?

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! Sounds like you might not have all of the elements installed?

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. Perhaps use Theano instead? Perhaps post to stackoverflow? scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! scipy: 1.1.0 numpy: 1.15.1 matplotlib: 2.2.3 pandas: 0.23.4 statsmodels: 0.8.0 sklearn: 0.19.0 Well done!

scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! scipy: 0.19.1 numpy: 1.12.1 matplotlib: 2.0.2 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.0 Well done! 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! Nice work!

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. Well done! 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 Perhaps skip Theano and focus on TensorFlow? 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! Well done! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.0 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! 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 Well done!

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’ Looks like Keras is not installed. 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.

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) Looks fine to me.

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 Well done! 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 Well done Tom! 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 Well done! scipy: 1.1.0 numpy: 1.14.3 matplotlib: 2.2.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.19.1 Well done! 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 I recommend saving code to a .py file and running from the command line: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line 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 Perhaps the upgrade failed? 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 Perhaps try installing Keras v2?, e.g. 2.2.4.

scipy: 1.1.0 numpy: 1.15.1 matplotlib: 2.2.3 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.19.2 Well done! theano: 1.0.3 Using Theano backend. keras: 2.2.4 Nice work! hello any one guide me how to install tensor flow Does the above tutorial help? 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?

Most examples do assume Python3.5 or higher, it might be best to use this version if possible. 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 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.

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 Perhaps try searching/posting the error to stackoverflow? 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? You can ignore it for now. 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.Perhaps try posting your error to stackoverflow? Perhaps try using Theano instead? 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) You can ignore this warning. Thanks scipy: 1.1.0 numpy: 1.15.1 matplotlib: 2.2.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.19.2 Well done! 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? Perhaps skip tensorflow and focus on theano? theano: 1.0.3 tensorflow: 1.11.0 Using TensorFlow backend. keras: 2.2.4 Well done! 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 Well done!

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! Looks like Keras might not be installed. Yes, you need (TensorFlow OR Theano), and you need Keras.

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.. Ouch! Perhaps try tensorflow instead? 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 Well done! 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). Thanks for the tip. sir please tell me how i open command editor in anaconda prompt I explain how to run a Python script here: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line as sir i have not installed python seprately theano: 1.0.3 tensorflow: 1.12.0 keras: 2.2.4 Well done! 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 !!! Well done! 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 Well done! It suggests that Keras is using the TensorFlow mathematical library instead of Theano.

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? 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/ Hi Jason That did the trick thanks Andrew 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 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?

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? That should be fine. theano: 1.0.3 tensorflow: 1.10.0 Using TensorFlow backend. keras: 2.2.2 Well done! 😉 scipy: 1.1.0 numpy: 1.15.4 matplotlib: 3.0.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.20.1 Well done! 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’ It looks like tensorflow is not installed. Perhaps change Keras to use the theano backend instead: https://keras.io/backend/ 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. Well done! Thanks for sharing your steps. 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 Perhaps try this approach instead: https://machinelearningmastery.com/install-python-3-environment-mac-os-x-machine-learning-deep-learning/ 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 Nice process. Perhaps just use theano instead? scipy: 1.1.0 numpy: 1.15.4 matplotlib: 3.0.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.20.1 Well done!

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’) It looks like you do not have sufficient permission to install software on your workstation. Perhaps talk to your system admin? theano: 1.0.3 tensorflow: 1.10.0 Using TensorFlow backend. keras: 2.2.4 Well done! 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. Well done! 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> Well done! 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 Well done! scipy: 1.1.0 numpy: 1.15.4 matplotlib: 3.0.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.20.1 Well done!

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 Well done!

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’ You must comment out the import statement for tensorflow.

theano: 1.0.3 tensorflow: 1.13.0-rc1 Using TensorFlow backend. keras: 2.2.4 Well done! 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 Well done! 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? Well done! Looks like a warning, perhaps ignore for now.

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. Well done! perfect!!! Thanks.

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 Perhaps try running code from the command line instead of an IDE or notebook, more details here: https://machinelearningmastery.com/faq/single-faq/why-dont-use-or-recommend-notebooks theano: 1.0.3 tensorflow: 1.12.0 keras: 2.2.4 Well done! How do i open text editor to run code instead of using the command line?

Perhaps this will help: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line 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’ I recommend changing the backend of Keras to use Theano instead of TensorFlow, details here: https://machinelearningmastery.com/introduction-python-deep-learning-library-keras/ 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 Looks like you might not have numpy installed?

(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 Well done James! 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 Nice work 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 >python deep_versions.py theano: 1.0.3 tensorflow: 1.13.1 Using TensorFlow backend. keras: 2.2.4 Well done! >python versions.py and python deep_versions.py SyntaxError: invalid syntax Saved the scrpits as text document to program location.

You must run then separately, one at a time from the command line, not from the Python interpreter. now it says, can’t find ‘__main__’ module in ‘versions.py’ 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 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” You will need to change directory to the location where you saved the file or move the file to your current working directory. 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. Sounds like a programming question, I recommend posting it to stackoverflow.

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 Sorry to hear that Alan, as I commented in my email: We’re reaching the limits of my capabilities – I’ve not seen a windows box in about 2 decades. Some ideas: – Perhaps try searching/posting on stackoverflow?

– Perhaps try another machine (laptop?) – Perhaps try contacting anaconda support? – Perhaps try a linux virtual box? e.g. https://machinelearningmastery.com/linux-virtual-machine-machine-learning-development-python-3/ $ 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 Well done!

$ ./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 Well done! 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> Well done. You might want to update to TensorFlow 1.13 if you can. 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 Well done! 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? Good to go! scipy: 1.1.0 numpy: 1.15.4 matplotlib: 2.1.2 pandas: 0.23.4 statsmodels: 0.9.0 sklearn: 0.20.0 Well done! 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? I don’t know sorry. Perhaps try posting on stackoverflow?

scipy: 1.2.0 numpy: 1.15.4 matplotlib: 3.0.2 pandas: 0.24.0 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! 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 Nice work! 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 Well done!

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. Well done! scipy: 0.19.1 numpy: 1.13.3 matplotlib: 2.1.0 pandas: 0.20.3 statsmodels: 0.8.0 sklearn: 0.19.1 Well done! scipy: 0.19.1 numpy: 1.13.1 matplotlib: 1.5.3 pandas: 0.18.1 statsmodels: 0.6.1 sklearn: 0.19.0 Well done! theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.13.1 keras: 2.2.4 Well done!

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 Well done! 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 Well done! 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 Well done! 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 No need to install them as they all come with Anaconda.

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 Well done! 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.

Thanks for the note. scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! 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> Sorry, I have not seen this before, perhaps try searching/posting on stackoverflow? 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!

Well done. You can ignore the warning. scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done. 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 Well done! NewMBP:python dr.sami$ python deep_versions.py theano: 1.0.3 tensorflow: 1.13.1 Using TensorFlow backend. keras: 2.2.4 Well done! scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! theano: 1.0.3 tensorflow: 1.13.1 keras: 2.2.4 Using TensorFlow backend. Well done! theano: 1.0.3 tensorflow: 1.13.1 Using TensorFlow backend. keras: 2.2.4 Thank youso much Well done!

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’ >>> Well done! Te error suggests tensorflow is not installed. 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. There are many ways to develop a regression model in Python, e.g. using sklearn for machine learning, use keras or tensorflow for deep learning, etc. Perhaps select the types of methods you want to explore first?

This might be a good starting point for you: https://machinelearningmastery.com/spot-check-regression-machine-learning-algorithms-python-scikit-learn/ 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 Well done! scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! theano: 1.0.3 tensorflow: 1.13.1 keras: 2.2.4 Well done! scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! 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 Nice one! 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) 🙂 Well done! 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 Yes, you can update to the latest versions.

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’) To run a script from the command line, type: More help here: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line 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 Well done!

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 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 Great work! Well done! scipy: 1.2.1 numpy: 1.16.4 matplotlib: 3.1.0 pandas: 0.24.2 statsmodels: 0.10.0 sklearn: 0.21.2 Well done! 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__’ Nice work.

It looks like sklearn might not be installed correctly? theano: 1.0.3 tensorflow: 1.14.0 Using Tensorflow backend keras: 2.2.4 Well done! 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. There may be, e.g. differences between the command line and a notebook/IDE. theano: 1.0.3 tensorflow: 1.13.1 keras: 2.2.4 Nice work!

Sir, what are the steps in creating Machine learning environment in miniconda with python 2.7 Perhaps you can use the above process, but instead choose a version of anaconda for Python 2.7? What are the packages to install to get your samples done in backpropagation examples. If you mean backprop from scratch tutorial, then just Python is required. 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? Good question, isolation of the environment from other environments would be the pro of using an environment. It’s a personal choice. If I create a different environment do I need to install deep libraries separately in that environment? You may. ************************************ 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 Well done!

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 Well done!

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?

Sorry to hear that, I have some advice here: https://machinelearningmastery.com/faq/single-faq/why-does-the-code-in-the-tutorial-not-work-for-me Yes Jason, your advice leads me to Stackoverflow, and they solved it with command “pip –upgrade theano”. So do i, although there’s still minor bugs. I think my windows is not a good fit for python, time to say goodbye to this 10 years old laptop. Tens of thousands of my readers use Python on Windows, it is feasible. Ya i rerun the code and everything was perfect! Happy to hear that.

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 Well done! Thank you for this You’re welcome.

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 Sorry to hear that. Perhaps try posting/searching on stackoverflow? 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 Well done!

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 Well done! 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 Well done!

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. Sorry, I am not familiar with this error. Perhaps some of the suggestions here will help: https://machinelearningmastery.com/faq/single-faq/why-does-the-code-in-the-tutorial-not-work-for-me Would you help me to make a machine translation From Bangla to English Language. Perhaps start with this tutorial and adapt it for your needs: https://machinelearningmastery.com/develop-neural-machine-translation-system-keras/ Please help me about keras set up What problem are you having exactly?

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.

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? 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 Perhaps use the anaconda prompt?

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 Perhaps just use the anaconda prompt? For anyone else with this issue in the future https://stackoverflow.com/questions/28612500/why-anaconda-does-not-recognize-conda-command Thanks for sharing.

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!

Looks good, you can ignore the warnings and other messages. theano: 1.0.4 tensorflow: 1.14.0 Using TensorFlow backend. keras: 2.3.0 Well done! 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 Well done! theano: 1.0.4 tensorflow: 1.14.0 Using TensorFlow backend. keras: 2.3.1 This is what I’ve got Great work. 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 Thanks. Well done on setting up your development environment! 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. Looks like you do not have permission to install software on your own workstation? Problem Importing theano- I am running the following code- and getting the result. How can I solve this ? Thank you.

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__) Perhaps try using tensorflow instead of theano if theano is giving you trouble? 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 .. Well done! scipy: 1.3.1 numpy: 1.16.5 matplotlib: 3.1.1 pandas: 0.25.2 statsmodels: 0.10.1 sklearn: 0.21.3 Well done!

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. Ouch, sorry, I have not seen this before. Perhaps try posting to stackoverflow or contact anaconda support? 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 Well done! 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 Well done!

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’ Sorry to hear that. Perhaps try installing tensorflow again? 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. DL is a type of ML. Yes, perhaps start here: https://machinelearningmastery.com/an-introduction-to-feature-selection/ I mean shallow learning (traditional machine learning algorithm like SVM, KNN, DT,…) thank you or your answer. Sorry, I don’t understand your question, can you elaborate please? import theano ModuleNotFoundError: No module named ‘theano’ The error suggests that theano is not installed.

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 Well done! 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 Well done! scipy: 1.3.1 numpy: 1.17.4 matplotlib: 3.1.1 pandas: 0.25.3 statsmodels: 0.10.1 sklearn: 0.21.3 Well done! 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 Well done! theano: 1.0.4 tensorflow: 2.0.0 keras: 2.3.1 Well done! 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. Perhaps contact the spacy developer support? I don’t have tutorials on the topic. 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 Well done! 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 ‘ Well done! You can check the version of statsmodels as follows: (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 Well done! (base) C:\Users\denni>python deep_versions.py theano: 1.0.4 tensorflow: 2.0.0 Using TensorFlow backend. keras: 2.3.1 Excellent. 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. Thanks for sharing your progress, and well done! 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. Perhaps try running code from the command line: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line try in cmd also. same error Sorry to hear that. Perhaps try re-installing the environment? (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 Well done! 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’ The error suggests you do not have tensorflow installed. You can install tensorflow or change keras to use the theano backend. #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? 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. scipy: 1.3.1 numpy: 1.17.2 matplotlib: 3.1.1 pandas: 0.25.1 statsmodels: 0.10.1 sklearn: 0.21.3 Well done! 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 Good question. I use TensorFlow 2 directly and Keras 2.3 via TF2 with Python 3.6. I can’t comment on Python 3.7.

At this stage I still recommend standalone Keras with TF2 as tf.keras still causes problems in some cases: https://machinelearningmastery.com/faq/single-faq/what-is-the-difference-between-keras-and-tf-keras Great Jason. Thank you for sharing your experience You’re welcome. ##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 Well done! 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. Well done, thanks for sharing! 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 Perhaps upgrade to the latest version of the library? Here are my results theano: 1.0.4 tensorflow: 2.0.0 keras: 2.3.1 Using TensorFlow backend. Well done! 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. It looks like keras might not be installed.

Try rebooting and run code again, if it fails, perhaps try re-installing keras? 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! Well done! 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? Well done.

Perhaps skip statsmodels of you don’t intend to use time series forecasting? 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! The problem is: Access is denied Try changing your permissions. Here you go… Thanks for sharing. 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 =) Well done!

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 Well done! 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 Well done! I don’t personally like ANACONDA. What could be possible disadvantages, if I continue with google colab? Thanks I don’t know about colab, sorry. 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. I find anaconda is simpler for beginners. You can use pip if you like. 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 Well done. scipy: 1.4.1 numpy: 1.18.1 matplotlib: 3.1.3 pandas: 1.0.1 statsmodels: 0.11.0 sklearn: 0.22.1 Nice work!

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 Well done. Unzip what files exactly? 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 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. owh…i was using the spyder..will it work too? No. that mean i can only use posix workstation?? so the tutorial use posix right?? It means a mac or a linux command prompt / terminal window: https://en.wikipedia.org/wiki/Command-line_interface still can unzip ”’unzip’ is not recognized as an internal or external command, operable program or batch file.” that what it says when i want to unzip the files..

Perhaps this will help if you are on windows: https://support.microsoft.com/en-au/help/14200/windows-compress-uncompress-zip-files theano: 1.0.4 tensorflow: 1.15.0 keras: 2.3.1 Using TensorFlow backend. Well done! good tutorial …i have finished installation of python env/t…just studying ur steps to go further.hope you do help me. Well done! Here’s a good next step: https://machinelearningmastery.com/start-here/#python how can i access posix workstation from anaconda??please help me See this: https://en.wikipedia.org/wiki/Command-line_interface 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 Sorry to hear that, perhaps try posting your error on stackoverflow? 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’ Sorry, I have not seen this error before, perhaps try searching/posting on stackoverflow. 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. Well done! You can safely ignore the warnings for now. 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 Well done!

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 Well done! scipy: 1.2.1 numpy: 1.16.2 matplotlib: 3.0.3 pandas: 0.24.2 statsmodels: 0.9.0 sklearn: 0.20.3 Well done! 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 Nice work.

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.) Nice work! theano: 1.0.4 tensorflow: 1.13.1 Using TensorFlow backend. keras: 2.3.1 Well done! 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 They are warnings, you can safely ignore them. Also, you should update to tensorflow 2.1 if you can.

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? Perhaps try rebooting? 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 Well done!

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 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? 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 Well done!

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 Well done! tensorflow: 1.14.0 keras: 2.3.1 theano: 1.0.4 tensorflow: 1.14.0 keras: 2.3.1 Well done! scipy: 1.4.1 numpy: 1.18.1 matplotlib: 3.1.3 pandas: 1.0.3 statsmodels: 0.11.0 sklearn: 0.22.1 Well done! 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 .

Sorry to hear that, perhaps try searching or posting on stackoverflow? scipy 1.4.1 numpy 1.18.1 matplotlib 3.1.3 pandas 1.0.3 statsmodels 0.11.0 sklearn 0.22.1 Well done! 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 Sorry to hear that, perhaps try searching/posting on stackoverflow. 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’ The error suggests tensorflow is not installed. 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. 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! 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 I believe you need to upgrade hour version of tensorflow to 2.0 or higher.

sir how to install pip.as spyder give error name pip is not defined The pip command is run from the command prompt, not from spyder. 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. Well done! You can ignore warnings.

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. Well done! 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 It looks like you need to update your version of tensorflow to v2.0 or higher. 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 Looks like you need to update to TensorFlow 2. 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 Sorry to hear that.

Perhaps contact anaconda support or search/post on stackoverflow. (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$ Well done! 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 Yes, you can run models on EC2 to get access to GPU hardware in an affordable way: https://machinelearningmastery.com/develop-evaluate-large-deep-learning-models-keras-amazon-web-services/ 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 I don’t know, sorry. 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, This will show you how to run scripts from the command line: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line 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 Well done! Consider updating to the latest version of tensorflow. 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 Well done! Perhaps update to tensorflow 2. Thanks You’re welcome. scipy: 1.4.1 numpy: 1.18.1 matplotlib: 3.1.3 pandas: 1.0.3 statsmodels: 0.11.0 sklearn: 0.22.1 Well done!

sir how i activate conda environment Follow the above tutorial, if you have problems with anaconda specifically, perhaps contact anaconda support directly or try posting on stackoverflow. 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? Perhaps try a reboot? Perhaps ensure you open the “anaconda prompt”?

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. Well done! I don’t know about that error, sorry. Perhaps you can try searching/posting on stackoverflow?

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 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. 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 Well done! Hi Jason, How to upgrade tensorflow from 1.12.0 to 1.15.2 in windows 64 bit using anaconda..?

As follows: scipy: 1.5.0 numpy: 1.18.5 matplotlib: 3.2.2 pandas: 1.0.5 statsmodels: 0.11.1 sklearn: 0.23.1 Well done! 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 Well done! You might have an issue with your GPU configuration, perhaps check the tensorlflow documentation.

Hi..I have Nvidia Geforce 820M GPU. Is it suitable for CNN computation? Which cuda version i need to install? plz help Perhaps start with the CPU for now, and move over to the GPU once you have your environment working reliably. 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! Nice work.

Looks like problems for GPU, you might want to search/post on stackoverflow. (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 >>> I have already install theano but why importing keras need tensorflow You can use theano instead of tensorflow, but you must configure keras to use the theano backend: https://stackoverflow.com/questions/42177658/how-to-switch-backend-with-keras-from-tensorflow-to-theano It looks like tensorflow is not installed. (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 Well done!

(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 🙁 Well done! Sorry, I can’t help you with configuring cuda. Perhaps try posting on stackoverflow. 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.

Perhaps use Python 3.6 or Python 3.7. 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. Well done, I’m happy to hear you solved the problem! 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 Well done! 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 Sorry to hear that.

I have not seen this error before, perhaps try searching/posting on stackoverflow? 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 Well done! 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 What error? 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.

Ouch, I have not seen this before, perhaps try keras 2.4, tensroflow 2.3 and check everything else is up to date. 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? Perhaps there is an older version of Anaconda on their website you can find? Perhaps try it anyway? 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? Perhaps try the most recent version? 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? Well done! Not really. These are the main libraries. OK.Thanks!! You’re welcome. 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 Well done! Great suggestion. 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 Well done! Sorry, I’m not familiar with that error, perhaps try searching/posting on stackoverflow? OK, I will. Thanks! Cuda installation was corrupted. Reinstalled. Now looking better. Well done!

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 Well done! theano: 1.0.4 tensorflow: 2.3.0 keras: 2.4.3 Well done! scipy: 1.5.0 numpy: 1.18.5 matplotlib: 3.2.2 pandas: 1.0.5 statsmodels: 0.11.1 sklearn: 0.23.1 Nice work! 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 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 Well done! Thanks a lot. You’re welcome.

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 I believe for the latest version of Keras that TensorFlow is required.

Sir, when I tried to install tensorflow it is giving an error. How to install it sir Sorry to hear that, perhaps try posting or searching for your error on stackoverflow.com 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!! Sorry, I can’t offer advice on this issue, perhaps try searching/posting on stackoverflow? 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? Thanks! It was a typo. Fixed, thank you. 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 Perhaps try rebooting? 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 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 Hi Craig, this is a common question that I answer here: https://machinelearningmastery.com/faq/single-faq/can-you-do-some-consulting 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. Sorry to hear that, this will help: https://machinelearningmastery.com/faq/single-faq/why-does-the-code-in-the-tutorial-not-work-for-me scipy: 1.5.0 numpy: 1.19.1 matplotlib: 3.3.1 pandas: 1.1.3 statsmodels: 0.11.1 sklearn: 0.23.2 Well done! Scipy: 1.5.0 Numpy: 1.19.1 Matplotlib: 3.3.1 Pandas: 1.1.3 Statsmodels: 0.12.0 Sklearn: 0.32.2 Well done.

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 I recommend installing TensorFlow v2.3 or higher. 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 Nice work!

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. Looks like you have some incompatibilities to resolve. 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 Perhaps you can change the version of one or more of your libraries? Perhaps you can try posting on stackoverflow?

scipy: 1.5.0 numpy: 1.19.1 matplotlib: 3.3.1 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Well done! 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. Nice work! theano: 1.0.4 tensorflow: 2.3.1 keras: 2.4.3 Well done! scipy: 1.5.0 numpy: 1.19.1 matplotlib: 3.3.2 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Well done! scipy: 1.5.2 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Well done.

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 Perhaps try rebooting? Perhaps try installing tensorflow again? 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. Nice work. I don’t know about that error message, sorry. Perhaps you installed the GPU version of tensorflow by mistake?

–>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 Well done!

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 Excellent! 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__) Sorry, I have not seen that error before. Perhaps try posting on stackoverflow. 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?? Very strange! Is it tensorflow version independent? Sorry i thought i’m on caption genrator page.

https://machinelearningmastery.com/develop-a-deep-learning-caption-generation-model-in-python/ Yes, you can install different versions of tensoflow, I recommend using the latest version if possible. 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 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.

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 Well done! scipy: 1.5.2 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.1.5 statsmodels: 0.12.1 sklearn: 0.23.2 Well done! theano: 1.0.4 tensorflow: 2.3.0 keras: 2.4.3 Nice work!

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. Great suggestion! 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 Sorry, I have not seen that error before. Perhaps try skipping theano and instead focus on tensorflow?

pythonscipy: 1.5.2 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.2.0 statsmodels: 0.12.1 Well done! scipy: 1.5.2 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Nice work! 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 Well done! 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 Well done! These suggestions will help: https://machinelearningmastery.com/machine-learning-performance-improvement-cheat-sheet/ theano: 1.0.4 tensorflow: 2.4.1 keras: 2.4.3 Thank You! Well done! scipy: 1.6.0 numpy: 1.19.2 matplotlib: 3.3.2 pandas: 1.2.1 statsmodels: 0.12.1 sklearn: 0.23.2 Well done! 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 . Well done on your progress! Perhaps try installing/updating TensorFlow first, then try Keras. 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 Well done! 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. Versions look good!

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. 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. No, either are fine for CPU only, I’d recommend going with TensorFlow if possible. Yes. Thank you, Jason!

I’m looking forward to learning more from you! — Dean You’re welcome! 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? That version should be good enough, I recommend moving forward. 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 Well done! 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 Well done! 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 ###################### Well done, although perhaps update some of your libraries. 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 Thanks for sharing Bernard! It’s great to have you here as part of the ML Mastery community.

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? Well done! I have installed anaconda in the directory where the folder contains space. How could I change the path and solve the issue? Perhaps you can uninstall anaconda and reinstall it? 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 Well done! scipy: 1.6.0 numpy: 1.19.2 matplotlib: 3.3.4 pandas: 1.1.3 statsmodels: 0.12.0 sklearn: 0.23.2 Well done! theano: 1.0.5 tensorflow: 2.4.0 keras: 2.4.3 Great work!

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 Well done! scipy: 1.6.1 numpy: 1.19.2 matplotlib: 3.3.4 pandas: 1.2.3 statsmodels: 0.12.2 sklearn: 0.24.1 Well done! Thanks to all. Very useful information Thanks!

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! You can configure the older version of Keras to use Theano instead of tensorflow if you like.

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! No problem. 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! This will show you how to run scripts: https://machinelearningmastery.com/faq/single-faq/how-do-i-run-a-script-from-the-command-line I faced problem at 5th step Sorry to hear that. Perhaps confirm you executed the previous steps correctly. 5. Confirm your SciPy environment.

Are these commands for downloading and updating libraries is also for windows? Yes, the tutorial works for linux, macos and windows. 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 Nice work! (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’ The error suggests that TensorFlow is not installed on your system. 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! You’re welcome. Very nice instruction! Thank you so much. Thanks!

Hello dear, Is it must to install Python at first before Anaconda? – From Bangladesh No. I believe python is part of the anaconda package. 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 Well done! 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. Thanks. please, i miss understane the difference between keras and tensorflow. Keras is an overlay or wrapper for tensorflow. Keras runs on top of tensorflow. 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? Perhaps skip theano and focus on tenroflow. scipy: 1.5.3 numpy: 1.19.4 matplotlib: 3.3.3 pandas: 1.2.0 statsmodels: 0.12.1 sklearn: 0.24.0 Well done! 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! Well done! 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 scipy: 1.6.2 numpy: 1.20.1 matplotlib: 3.3.4 pandas: 1.2.4 statsmodels: 0.12.2 sklearn: 0.24.1 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) 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”. 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 (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) It seems your keras is too old to use tensorflow 2.3; doing “conda update keras” may help (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 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. 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.

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 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? 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” Answer to myself: import keras is no more working.

Keras is now a part of tensorflow: from tensorflow import keras 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 ..

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 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 hey, this is test reply 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.

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) 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) Hi Hank…Do you have a specific question that may be addressed to better assist you?

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 Hi Patrick…Did you copy and paste the code or type it into your editor? 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. 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. 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 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. 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. 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. scipy: 1.5.2 numpy: 1.20.3 matplotlib: 3.4.2 pandas: 1.1.3 statsmodels: 0.13.1 sklearn: 1.0.1 Thank you for the feedback Meenakshi!

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 Hi Meenakshi…You may want to investigate Google Colab while you are resolving your local environment issues.

scipy: 1.7.3 numpy: 1.21.5 matplotlib: 3.5.1 pandas: 1.4.2 statsmodels: 0.13.2 sklearn: 1.0.2 I’m not seeing the line – ‘Using Tensorflow backend’ My output is – tensorflow: 2.6.0 keras: 2.6.0 Hi Samin…Is your Anaconda environment working for development of your machine learning models? 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.

Hi Mina…The following discussion may prove helpful: https://stackoverflow.com/questions/43264773/pil-dll-load-failed-specified-procedure-could-not-be-found 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 Hi Madan…In general at the current time, we have content updated to Tensorflow/Keras as covered in the following tutorial: https://machinelearningmastery.com/tensorflow-tutorial-deep-learning-with-tf-keras/ 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 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’ Hi Charlene…The following may be of interest: https://theano-pymc.readthedocs.io/en/latest/install_windows.html 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 Hi F. Ornelas…The following discussion may add clarity: https://stackoverflow.com/questions/48838386/g-not-available-if-using-conda-conda-install-m2w64-toolchain scipy: 1.9.1 numpy: 1.21.5 matplotlib: 3.5.2 pandas: 1.4.4 statsmodels: 0.13.2 Thank you Bill for your feedback! 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’ 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. 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! 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 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. 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. Hi Tamzin…What is the exact verbiage of the error you encountered? That will better enable us to assist you. 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.

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 builtinbool . To avoid this error in existing code, usebool by itself. Doing this will not modify any behavior and is safe.

If you specifically wanted the numpy scalar type, usenp.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? 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! Thank you for you feedback Claude!

We appreciate your support! scipy: 1.11.1 numpy: 1.24.3 matplotlib: 3.7.2 pandas: 2.0.3 statsmodels: 0.14.0 sklearn: 1.3.0 Thank you for your reply Mike! Let us know if you have any questions regarding our content.

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 Thank you Rob for your feedback! Let us know what you find as you work through the issue. 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 scipy: 1.11.4 numpy: 1.24.3 matplotlib: 3.8.0 pandas: 2.1.4 statsmodels: 0.14.0 sklearn: 1.3.0 Thank you for your feedback! Keep up the great work!

scipy: 1.11.14 numpy: 1.24.3 matplotlib: 3.8.0 pandas: 2.1.4 statsmodels: 0.14.0 sklearn: 1.3.0 seaborn: 0.12.2 scipy: 1.11.4 numpy: 1.26.4 matplotlib: 3.8.0 pandas: 2.1.4 statsmodels: 0.14.0 sklearn: 1.2.2 scipy: 1.11.4 numpy: 1.24.3 matplotlib: 3.8.0 pandas: 2.1.4 statsmodels: 0.14.0 sklearn: 1.3.0 Thank you Rob for your feedback! Keep up the great work! WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

theano: 1.0.5 tensorflow: 2.13.0 keras: 2.13.1 Hi Carlos…The warning you’re seeing, WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions , indicates that Theano is not able to use a faster BLAS (Basic Linear Algebra Subprograms) implementation, like OpenBLAS or MKL. Instead, it’s defaulting to a slower NumPy-based implementation for certain matrix operations, which may slow down computations.Here’s what you can do to address this warning and optimize performance: 1.

**Install OpenBLAS or MKL**: If you haven’t already, install a faster BLAS library, such as OpenBLAS or MKL, on your system. You can typically install these with your package manager, e.g., – For OpenBLAS: sudo apt-get install libopenblas-dev (Ubuntu) orbrew install openblas (macOS).– For MKL (if using Anaconda): conda install -c anaconda mkl .2. **Set Environment Variables**: Once the library is installed, set up the environment variables so that Theano can find and use it.

You can add these lines to your .bashrc (Linux/macOS) or.bash_profile :bash export THEANO_FLAGS='blas.ldflags=-lopenblas' Replace -lopenblas with the correct flag for your installed BLAS library if necessary.3. **Switch to Another Backend (Optional)**: Since Theano is no longer maintained, you may consider switching to a more modern backend like TensorFlow, PyTorch, or JAX, especially since you’re already using TensorFlow and Keras. 4. **Verify Installation**: You can verify if Theano is using the BLAS library by running: python import theano theano.test() The output should show if it recognizes the BLAS library.

If you’re using Theano primarily with Keras, TensorFlow may already cover most functionalities efficiently, reducing the need for Theano in your setup. How do you save the file as versions.py in the terminal? To save a file as versions.py in the terminal the following two methods are recommended:— Method 1: Using nano Editor (Recommended)1. Open your terminal. 2. Type the following command to open the nano editor:bash nano versions.py 3.

In the editor, type or paste the following Python code: python import sys import numpy import scipy import matplotlib import pandas import sklearn print('Python: %s' % sys.version) print('numpy: %s' % numpy.__version__) print('scipy: %s' % scipy.__version__) print('matplotlib: %s' % matplotlib.__version__) print('pandas: %s' % pandas.__version__) print('sklearn: %s' % sklearn.__version__) 4.

To save and exit: Press Ctrl + O to save the file.Press Enter to confirm the filename.Press Ctrl + X to exit the editor.— Method 2: Using echo (Quick One-Liner for Simple Scripts)If you just want to write a short script quickly: bash echo "print('Hello from versions.py')" > versions.py — Run the Script Once saved, you can run the Python file: bash python versions.py Please try these steps and let us know how it goes!

Hi Jason, here is my output: scipy: 1.15.3 numpy: 2.1.3 matplotlib: 3.10.0 pandas: 2.2.3 statsmodels: 0.14.4 sklearn: 1.6.1 Thank you Audric! Keep us posted on your progress!

People Also Asked

Anaconda (Python distribution) - Wikipedia?

You can ignore those warnings for now unless you want to dive into compiling tensorflow from scratch on your system (not recommended). I would create a python 3.5 (anaconda3) program executable, please how to do it? Sorry, I cannot help you with this. python deep_versions.py theano: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291 tensorflow: 1.1.0 Using TensorFlow backend. keras: 2.0.5 Nice wor...

Anaconda Learning?

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 I thin...

Anaconda.org?

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

How to Setup Your Python Environment for Machine Learning with Anaconda ...?

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

Insiden Langka Pria Ini Gigit Anaconda Raksasa di Amazon - detikcom?

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. Thanks for sharing!