Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up Octave #3

Open
takuyaa opened this issue Oct 15, 2015 · 6 comments
Open

Setting up Octave #3

takuyaa opened this issue Oct 15, 2015 · 6 comments

Comments

@takuyaa
Copy link
Owner

takuyaa commented Oct 15, 2015

Octave の環境構築など

@itchyny
Copy link

itchyny commented Oct 15, 2015

brew install octave でインストールしました。依存関係でgccをコンパイルし始めました。2時間位かかったと思います。放っておくといつかは終わります。信じましょう。
最初グラフを描画できなくて困ったのですが、gnuplotをaquaterm付きでbuildし直すと描画できるようになりました。

brew uninstall gnuplot
brew install gnuplot --with-aquaterm

グラフを描画できるか確認

x = -5:.1:5;
y = sin(x);
plot(x, y);

もしうまくいかない時は、設定ファイル (私の手元では /usr/local/share/octave/site/m/startup/octaverc でした) で出力先を指定します。

setenv("GNUTERM", "aqua")

@motemen
Copy link

motemen commented Oct 16, 2015

自分は aquaterm でうまくいかなかったので brew reinstall gnuplot --with-x11 しました。

~/.octaverc に

setenv('GNUTERM','x11')

と設定してます。

@takuyaa
Copy link
Owner Author

takuyaa commented Oct 17, 2015

Yosemite で brew install octave したら、以下のエラーが出て Octave がインストールできませんでした。

$ brew install octave
Error: No available formula for octave
==> Searching formulae...
==> Searching taps...
homebrew/science/octave    Caskroom/cask/octave       Caskroom/cask/xoctave

以下のように brew tap してから、再度 brew install octave すると、インストールが進みました。

$ brew tap homebrew/science
==> Tapping homebrew/science
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-science'...
remote: Counting objects: 565, done.
remote: Compressing objects: 100% (563/563), done.
remote: Total 565 (delta 2), reused 78 (delta 1), pack-reused 0
Receiving objects: 100% (565/565), 448.93 KiB | 398.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done
Tapped 559 formulae (575 files, 3.0M)

cf. OctaveをMac OS X Yosemiteへインストール

@takuyaa
Copy link
Owner Author

takuyaa commented Oct 17, 2015

itchyny さんと同じように --with-aquaterm で gnuplot をインストールする方法でうまくいきました。
自分の環境には AquaTerm が入っていなかったので、 brew reinstall gnuplot --with-aquaterm する前に、AquaTerm をインストールしました。

  1. OS X のセキュリティを変更
  2. AquaTerm を SourceForge のダウンロードページ から落としてきて解凍
  3. .pkg からインストール

brew reinstall gnuplot --with-aquaterm のあと、 ~/.octaverc に以下の内容を設定しました。

setenv('GNUTERM','aqua')

x11 より aquaterm の方がグラフがちょっと綺麗です。

@tarao
Copy link

tarao commented Oct 17, 2015

docker使ってLinuxで環境汚さずインストールしてみました: https://gist.github.com/tarao/e3bfd803b646a7b7638c

ホスト側のユーザ名をコンテナ内に渡すようになっているのでホームディレクトリに読み書きしたりしてもだいじょうぶです。

ふだんXDMCPでデスクトップ表示しててDISPLAY変数が/etc/hostsに書いたホストになってたのでちょっとめんどくさい感じはしましたがなんとかなりました(特殊事例すぎる)。

@stanaka
Copy link

stanaka commented Feb 8, 2016

最近、環境を再セットアップしてましたが、AquaTermのインストールをCask使って、

brew install Caskroom/cask/aquaterm

で入れた他は
#3 (comment)
と同様にできました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants