简体   繁体   English

在同一个终端会话中运行Octave

[英]Run Octave within the same Terminal session

I set an alias in my .bash_profile for Octave 我在.bash_profile为Octave设置了一个alias

alias octave="open /Applications/Octave.app"

It opens in a new Terminal window. 它将在新的终端窗口中打开。 How do I run Octave within the same Terminal session like Python does? 如何像Python一样在同一个终端会话中运行Octave?

Your mileage may vary, but I just installed Octave via homebrew 您的里程可能会有所不同,但我刚刚通过自制软件安装了Octave

$ brew install homebrew

...and it actually worked. ......它确实有效。 It failed once, and I had to manually brew install gfortran but then everything came together nicely. 它失败了一次,我不得不手动brew install gfortran然后一切都很好地结合在一起。

I had tried this a year ago and it was very painful and I ended up using the bundled .app version like you (and made an alias exactly like the one you came up with), but now installing from source seems to have worked great. 我曾在一年前尝试过这一点,这非常痛苦,我最终使用了像你这样的捆绑.app版本(并且制作了一个与你想出的完全相同的别名),但现在从源代码安装似乎运行得很好。 Plus, it gives you more options for plotting besides gnuplot. 此外,除了gnuplot之外,它还为您提供了更多绘图选项。

找到了:

alias octave = "/Application/Octave.app/Contents/Resources/bin/octave"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM