Recently, some of the content of deep learning needs to use the library of deep learning: Theano. But Theano this thing in Linux or Mac OS is better installed, only need to install Anaconda and then use the Python installation command, pip install Theano can, but in windows, before loading often error appears no Module named Gof This error is annoying, read some information, and then finally installed in Windows Theano, the installation steps to say:
Installation Environment: Windows7 64-bit flagship edition
Step1: Install anaconda, this directly to the official website down on the line, after the download is complete, click on the installation on the line, after the installation of the fact that the Anaconda environment has been configured in your path inside
Step2: Installing MinGW
Because Windows does not have a GCC suite, you need to install MINGW, the process of installing mingw is not complicated, do not believe what the next compression package put into the Python package, direct use of the command
Conda Install MinGW Libpython
Just go and install it directly.
STEP3: Modifying environment variables
You need to add a few new environment variables:
Add one in Path: D:\anaconda2\mingw\bin;d:\anaconda2\mingw\x86_64-w64-mingw32\lib
STEP4: Installing Theano
Theano installation is more convenient to use the installation command:
pip install Theano,
And then you can wait for the installation to complete.
STEP5: Add Theano environment variable
Add an environment variable Pythonpath: The installation location with a value of Theano for example, mine is D:\Anaconda2\Lib\site-packages\theano.
STEP6: Add a configuration file
In the CMD user environment, add a. theanorc.txt file, where the CMD user environment refers to the user identity under the folder, such as I am logged in as an administrator, so I need to C:\Users\admin this root directory under the new one . Theanorc.txt file, if you are logged in as a man account, then this address should be:C:\Users\man Note that there is a dot in front of it, the value of the text is:
[Global]openmp=false[blas]ldflags=[gcc]cxxflags =-id:\anaconda2\mingw
cxxflags behind the D:\Anaconda2\MinGW is the Anaconda installation directory under the MinGW file path, you can make the corresponding changes according to their location.
Step:7 tested in a Python environment after installation:
Execute the following two commands:
Import Theano
Theano.test ()
If there is some installation information for Theano, then the installation is successful ~
Install Theano under Windows