I thought about trying deep learning using the famous Pylearn2, and if I installed it easily with pip as follows, I thought that I would do http://qiita.com/dsanno/items/a1d805a89e192c44730d as a tutorial, but pip Could not install.
pip install pylearn2
I was able to install it by referring to the following page, but there were some differences in my environment, so I will publish the revised one for beginners here. Since it is for beginners, experienced people should see the following page sooner.
http://deeplearning.jp/macbookにpylearn2をインストールする/
--MacBook 12 inch 2015 model
The flow is to install Theano and then Pylearn 2.
Install the prerequisite software for Theano.
First from gcc.
brew install homebrew/versions/gcc48
which gcc
ln -s /usr/local/bin/gcc-4.8 /usr/local/bin/gcc
which gcc
gcc --version
/usr/bin/gcc --version
Then PyYAML and so on.
pip install PyYAML
pip install IPython
pip install Cython
pip install NumPy
pip install SciPy
The last prerequisite software is PIL.
Refer to http://rakkyoo.net/?p=1266 http://effbot.org/downloads/Imaging-1.1.7.tar.gz After downloading and unzipping, move to the directory and install.
cd Downloads/Imaging-1.1.7
python setup.py install
I installed Theano, but it didn't work with the following command, so I did it from git clone.
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
Below are the steps from git clone. http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions Although it is the procedure described in.
mkdir git
cd git/
git clone git://github.com/Theano/Theano.git
cd Theano/
python setup.py develop
Finally, make sure you can import.
python
import Theano
This completes the installation of Theano.
It's finally time to install Pylearn 2.
cd git/
git clone git://github.com/lisa-lab/pylearn2.git
cd pylearn2/
python setup.py develop
Confirm that it can be imported.
python
import pylearn2
After that, it seems that it is necessary to prepare the data set, but since I have not actually used pylearn2 yet, I think that you should see the rest from the data set preparation on the reference page. http://deeplearning.jp/macbookにpylearn2をインストールする/
http://deeplearning.jp/macbookにpylearn2をインストールする/ http://rakkyoo.net/?p=1266 http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions
Recommended Posts