最近在看deep learning的相关知识,从deeplearning.net上下载了一份代码 lisa-lab / DeepLearning
项目主页:https://github.com/lisa-lab/DeepLearningTutorials
代码下载地址:https://github.com/lisa-lab/DeepLearningTutorials/archive/master.zip
需要配置以下环境,具体安装步骤如下:
0、python最好是2.6以上的,版本低的,记得升级一下。
1、安装setuptools
https://pypi.python.org/pypi/setuptools/
python setup.py install 提示错误:Compression requires the (missing) zlib module
yum install zlib
yum install zlib-devel
安装完成后,重新编译 python2.7【不需要删除,只需要重新编译,make,安装就行了】
2、安装scipy
easy_install scipy
提示错误:Download error on https://pypi.python.org/simple/scipy/: unknown url type: https — Some packages may not be found!
检查一下你的网络,能否连到互联网上。
如果可以,看一下https协议是否安装,openssl,没有就装一下。
yum install openssl-devel
最好把相关的,都装一下。
yum install openssl
安装完成后,重新编译 python2.7,make,make install
3、安装scipy
http://www.scipy.org/install.html
sudo yum install numpy scipy python-matplotlib ipython python-pandas sympy python-nose
4、安装Theano
easy_install Theano
5、安装PIL
千万记得不要 easy_install PIL,会缺东西
1) 卸载你的PIL (在”/Library/Python/2.7/site-packages/”目录找到PIL,连同PIL.pth一起删除之)
2) yum install libjpeg libjpeg-devel zlib zlib-devel freetype freetype-devel lcms lcms-devel
3) 在这下载PIL: http://effbot.org/downloads/Imaging-1.1.7.tar.gz
4) 解压PIL安装包
$ tar zxvf Imaging-1.1.7.tar.gz
$ cd Imaging-1.1.7
5) 编辑解压出来的setup.py, 设置:
6) 安装PIL
$ python setup.py build_ext -i
如果和下图的不符合,说明缺少相应的包,去安装!
$ python selftest.py – Run the selftest to confirm PIL is installed ok
如果和下图的不符合,说明缺少相应的包,去安装!不然即使执行下一步,后面跑代码的时候还是会挂!
$ sudo python setup.py install
enjoy it!