ubuntu環境下,Octave部分包的安裝

文中涉及的Octave包不多,但是可以作爲一個舉一反三的例子。

喵哥在Octave中執行腳本時,遇到軟件缺少包無法執行“pdist”函數。

warning: the 'pdist' function belongs to the statistics package from Octave Forge
which seems to not be installed in your system.

Please read <http://www.octave.org/missing.html> to learn how youcan
contribute missing functionality.

https://stackoverflow.com/questions/18862354/octave-pdist-pairwise-distance中提到要安裝statistics包需要先

pkg install -forge io

但是,喵哥在執行這個命令的時候還是報錯。參考了https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1380199後,依次在終端執行

sudo apt-get install octave-general

sudo apt-get install liboctave-dev

然後在Octave執行

pkg install -forge io

在終端執行

sudo apt-get install octave-statistics

在Octave執行

pkg install -forge -nodeps statistics

然後在需要用到statistics包裏的函數時,就在Octave執行

pkg load statistics

或者在腳本中加入這個載入命令。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章