macos上安裝theano的時的問題解決

 在學dl,參見,http://deeplearning.net/tutorial/,打算在mac的機器上裝個theano,跑一下例子,結果整了2小時才搞定,真囧html

 系統是macos:10.8.3,先安裝了anaconda1.6.1,再pip裝theano 0.6.0rc3,具體步驟參見教程,http://deeplearning.net/software/theano/install.html#installpython

 裝好後運行在python中運行import theano theano.test()報錯:git

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的信息。
相關文章
相關標籤/搜索