macos上安装theano的时的问题解决

 在学dl,参见,http://deeplearning.net/tutorial/,打算在mac的机器上装个theano,跑一下例子,结果整了2小时才搞定,真囧

 系统是macos:10.8.3,先安装了anaconda1.6.1,再pip装theano 0.6.0rc3,具体步骤参见教程,http://deeplearning.net/software/theano/install.html#install

 装好后运行在python中运行import theano theano.test()报错:

WARNING (theano.gof.compilelock): Overriding existing lock by dead process '4394' (I am process '4182')
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

google了一下,找到了解决讨论帖:https://github.com/Theano/Theano/issues/1319,原来是直接pip install的theano版本不行呀,
讨论帖给出了修正的链接https://github.com/rkern/Theano/tree/fix-libpython-osx,rkern也评论这个branch是FIX: Do not explicitly link against libpython2.x on OS X.
哈哈,按讨论帖说的删除~/.theano下的东东,在新下载的theano目录执行setup.py安装,然后自定义一下.theanorc文件,指定
[cmodule]
mac_framework_link=False

然后就O了,执行theano.test()会输出theano,numpy跟python的信息。

posted on 2013-07-16 15:33  Renaissancer  阅读(1883)  评论(0)    收藏  举报

导航