Win7 on Python+theano+keras installation __python

Source: Internet
Author: User
Tags theano keras

Python + Theano + keras installation on Windows:

In fact, the process is very simple, first of all, to say the installation conditions:
1, Win7 (32 and 64 can be, download the installation package must choose the corresponding)

2, Anaconda (go to the official download, open a little later will come out to download the link.) It was chosen because it built Python, as well as the NumPy, scipy two necessary libraries, and some other libraries, which were less convenient than the installation itself. As for the version of casual choice, if you want to install python3.4 to download the corresponding Anaconda3. This tutorial uses Anaconda, which is the corresponding python2.7 version. There is no difference in the installation process. )

Installation process:
First, uninstall the previous version.
Uninstall the previously installed Python, and so on. When you learn python, you install python2.7 directly, and unload it first because Anaconda contains Python.

Second, the installation of Anaconda.
This super simple, install directory I use the default C:\Anaconda. There will be 360 interception in the middle, all allowed.

Third, the installation of MinGW.
Other tutorials Add path C:\Anaconda\MinGW\bin to environment variables; C:\Anaconda\MinGW\x86_64-w64-mingw32\lib; , but you will find that there is no MinGW this directory C:\Anaconda\, so the best way is to use the command to install, do not need to download what mingw-steup.exe, and so on.
Installation method:
1. Open cmd (note that the Windows command prompt does not go into the Python environment or prompts for syntax errors, because the Conda command is executed under Windows.) );
2. Input Conda install MinGW Libpython, then enter, will appear installation progress, wait a moment can install complete. At this point there is the C:\Anaconda\MinGw directory.

Iv. Configure environment variables.
1. Edit the path variable in the user variable (if not a new one, generally will have), appended C:\Anaconda; C:\Anaconda\Scripts; Do not omit the semicolon, here because my Anaconda installation directory is C:\Anaconda, it needs to be completed according to its own installation directory.
2. Create a new variable Pythonpath in the user variable, and the variable value is C:\Anaconda\Lib\site-packages\theano; , here is to indicate the installation of the Theano directory is, but now we have not installed, so do not worry, first finished.
3. Open cmd, you will see the window inside there is a path, mine is C:\users\locked>, according to their own path, find the corresponding directory, in the directory to create a new text document. Theanorc.txt (Note that there are two "." ), edit it, and write the following:
[Global]
Openmp=false
[Blas]
ldflags=
[GCC]
Cxxflags=-ic:\anaconda\mingw
The red body Word part is the path that you install Anaconda, must not be mistaken. Otherwise I can't find MinGW.
4. It's best to restart the computer.

V. Installation of Theano.

The previous steps are basically the same as other blogs, but Theano is not recommended for installation using CMD's PIP. Personal feeling may be the PIP installed Theano there is a missing file. So it is recommended that you download a special Theano library from the Internet to configure. I also in this piece of tossing for a long time, and experiment for a long time, repeatedly installed just know the problem here. Because of my hardware facilities, can only run on the CPU code. On the GPU configuration can refer to other blogs, the above configuration on the Cup ran no problem.

Theano Download Connection: Https://github.com/Theano/Theano. In the cmd window find Theano decompression path (i unzipped the path): C:\Anaconda\Lib\site-packages\Theano-master input command python setup.py install. Wait for installation to complete.

Vi. installation of Keras.

It is easy to install with the Pip method. That is, open cmd, enter pip install Keras, then wait for installation to complete. So far the configuration is complete.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.