筆記-ubuntu14.04安裝pymc
PyMC是一個實現貝葉斯統計模型和馬爾科夫鏈蒙塔卡洛採樣工具擬合演算法的Python庫。
sudo easy_install pymc
報錯,說找不到numpy,但明明numpy已經安裝了啊。找了方案,要使用pip3 install numpy才行,於是用pip3重裝了numpy
再次sudo easy_install pymc, 卻又報錯:
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
Could not locate executable nagfor
dont know how to compile Fortran code on platform posix
說是需要安裝gfortran,於是,sudo apt-get install gfortran
再次sudo easy_install pymc, 卻又報錯:
pyconfig.h文件找不到。找了方案,說是必須sudo apt-get install python-dev python3-dev,於是這麼做了。
再次sudo easy_install pymc,才終於安裝完成!
用import pymc測試
發現,python2.7仍然不認識pymc,python3.4認識卻在scipy處崩潰。有方案說,需要sudo easy_install pymc3,於是這麼做了。
用import pymc測試
這下,python3.4可以執行了,python2.7仍然不認識pymc。沒辦法,只好放棄,以後看有機會在搞定2.7。
用pymc.test()測試
掛了。在nose_tools.utils.py的71行。於是用sudo easy_install nose,把nose重裝一遍。
用pymc.test()測試
這次,很快跑了177個測試,1個error。
推薦閱讀:
※筆記工具思考與功能設計
※Python數據分析學習(1)
※《論語》,孔子的喪葬工作筆記
※如何創建一個server伺服器
※毛中特·第一章-馬克思主義中國化
TAG:筆記 |