科学计算软件——Octave安装

Octave是一个旨在提供与Matlab语法兼容的开放源代码科学计算及数值分析的工具,是Matlab商业软件的一个强有力的竞争产品。

参考:【ML:Octave Installation

General

Installation files for all platforms are available at the GNU Octave Repository on SourceForge.

The Gnu Octave Wiki has installation instructions for Windows and Mac OS X.

The present instance of the course was tested using Octave 3.8.2. Earlier versions of Octave are not guaranteed to work. Very early versions are known to NOT work for the submit.m script.

Windows

Version 4.0.0

Octave 4.0.0 is available, but has a bug in its printf() function which impacts the submit.m script for all exercises. Workarounds are available via the discussion forums. The present instance of the course also uses a SSL method in the submit.m script, which can throw errors with security certificate access to the grader server. Workarounds are available via the discussion forums.

Version 3.6.4

  • The "Microsoft Visual Studio" or "Windows MinGW" version installers can be downloaded from Sourceforge.
  • On Windows 8, you may see a console-related problem whereby Octave crashes and disappears at any syntax error; fix is detailed atstackoverflow.com

Version 3.6.2

  • This bug-fix version was released on 5 June 2012. The "Microsoft Visual Studio 2010" version installer can be downloaded fromSourceforge. It seems more reliable than the MinGW 3.6.1 version, although some annoying bugs have been retained.
  • When installing this version from Cygwin, urlread/urlwrite may fail, resulting in an error message like:/usr/lib/octave/3.6.2/oct/i686-pc-cygwin/urlwrite.oct: failed to load: No such process. Thus the submit function provided with programming exercises also fails (submitWeb still works).
    I successfully worked around this by replacing urlwrite.oct with the file from the Octave/Cygwin 3.6.1 binary distribution. (Problem has also been mentioned in this thread for ml-2012-002.)

Version 3.6.1

  • The most recent version is from 3/5/2012, at the Sourceforge site. Installation instructions for Windows and Cygwin are on the Wiki.
  • If you are having problems with crashes during (re-)plotting, see this bug report concerning libblas.dll versions. You can probably reproduce this problem by typing the command:
    demo plotyy
    

If you have the wrong version of libblas.dll installed, this will generally crash Octave. The libblas.dll.ref version is a slow but stable version.

Version 3.2.4

  • The tutorial on the course website is actually for version 3.2.4. This version is considered "very old" by the Octave Wiki. This version has a bug in the readline.dll file that causes garbage characters to show up when attempting to use command line history editing. Versions 3.4 and higher fix this.
  • Sometimes problems occur with Octave and gnuPlot if you have oct2mat module loaded. Try "pkg unload oct2mat‘ when you first run Octave. If that solves the problem you can make it permanent by either adding the line to your config file, or by executing "pkg uninstall oct2mat" command[1].

Mac OS X

Version 3.8.1

If you are not afraid of the Terminal you can use Homebrew. This is by far the easiest method of installing everything that is needed. In fact, this may be the best option for versions of OSX prior to 10.9 Mavericks, because the Octave wiki states that the binary installer is to be used "at your own risk" and is "not guaranteed to work" with anything other than OSX 10.9 Mavericks.

Let‘s install Homebrew as the easiest solution. Open Terminal and type the installation command below, which is listed on the Homebrew home page also, and then hit enter:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You will need a set of command line tools that are a subset of XCode. If you‘re comfortable with the Terminal, then use the command below to install just what is needed. Otherwise (or if you have issues), you need to install XCode from App Store, go to the XCode preferences -> Downloads/Components section, and then select Command Line Tools to be installed.

xcode-select --install

Let‘s install an up to date gcc compiler:

brew install gcc

You will also need to install [MacTeX]. This can be done with Homebrew, as seen below using the Homebrew Cask project, or by downloading and installing from the website (http://www.tug.org/mactex/).

brew install caskroom/cask/brew-cask
brew cask install mactex

Now let‘s install the plotting software, gnuplot, and have it use native Qt graphics (instead of the older X11 setup):

brew install gnuplot --qt

Finally, let‘s install Octave (note all build issues have been fixed, as of Nov 4th 2014):

brew tap homebrew/science
brew install octave

And tell Octave to use Qt graphics with gnuplot when plotting:

echo "setenv GNUTERM qt;" >> ~/.octaverc

Now restart your Terminal and launch octave:

octave

Also, to avoid having to constantly change directories after starting octave, the following script will load octave with the Terminal‘s current working directory automatically set in octave. Let‘s set it up:

echo ‘#!/bin/bash‘ >> /usr/local/bin/oct
echo ‘octave -p "`pwd`"‘ >> /usr/local/bin/oct
chmod +x /usr/local/bin/oct

And to start octave using this script instead (for example when you are working in a project directory and want to load octave with the directory already set):

oct

Known Issues: Executing GNUPlot gives error message on Octave (v 3.4.0) with X11 installed on OS 10.6.8(Snow leopard). For example: octave-3.4.0:10> hist(w) warning: broken pipe -- some output may be lost "Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0"

Fix: Open terminal window and type following 3 lines: cd /Applications/Gnuplot.app/Contents/Resources/lib mv libfreetype.6.dylib libfreetype.6.dylib.bak ln -s /usr/X11/lib/libfreetype.6.dylib .

(Source and explanation : http://stackoverflow.com/questions/19932161/incompatible-library-version-libfontconfig-1-dylib-13-instead-of-15)

Linux

Ubuntu

Ubuntu Software Center

Just search for GNU Octave in Ubuntu Software Center and click install. When the installation finishes, you‘re ready to use Octave.

Command Line

If you prefer using the command line or if you have an Ubuntu based version of Linux that comes without Ubuntu Software Center, you can install Octave by typing this command on a terminal:

(默认安装3.8.1版本)

sudo apt-get install octave

If you get an error "E: Package ‘octave3.2‘ has no installation candidate", then follow these steps

sudo apt-add-repository -y ppa:mtmiller/octave
sudo apt-get update
sudo apt-get install octave

Red Hat / CentOS

Command Line

You can install Octave from the yum repository using the following command lines:

sudo yum install epel-release
sudo yum install octave

Browser (any OS)

It is possible to use Octave online, without installing it on local computer. Web interface has a code editor and REPL console with inline plots. It gives access to Octave 3.6.4.

URL: http://octave.im/

Category:

时间: 2024-10-25 05:41:17

科学计算软件——Octave安装的相关文章

【Python】Linux下python科学计算库的安装

scipy系列库有相当多的依赖,导致安装过程比较痛苦.要不停的去找依赖. 发现一个小日本给出的安装过程: 原载: http://memo.yomukaku.net/entries/jbRkQkq 1.  安装Python 2.7.3 Python 2.7.3のインストール cd src wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz tar zxvf Python-2.7.3.tgz cd Python-2.7.3 ./c

windows下安装python科学计算环境,numpy scipy scikit等

背景: 目的:要用Python下的DBSCAN聚类算法. scikit-learn 是一个基于SciPy和Numpy的开源机器学习模块,包括分类.回归.聚类系列算法,主要算法有SVM.逻辑回归.朴素贝叶斯.Kmeans.DBSCAN等,目前由INRI 资助,偶尔Google也资助一点. SciPy是一个开源的Python算法库和数学工具包,SciPy包含的模块有最优化.线性代数.积分.插值.特殊函数.快速傅里叶变换.信号处理和图像处理.常微分方程求解和其他科学与工程中常用的计算.其功能与软件MA

转载~如何在Pycharm中安装numpy等科学计算库

转载自机器小人z windows下如何快速优雅的使用python的科学计算库? Python是一种强大的编程语言,其提供了很多用于科学计算的模块,常见的包括numpy.scipy.pandas和matplotlib.要利用Python进行科学计算,就需要一一安装所需的模块,而这些模块可能又依赖于其它的软件包或库,因而安装和使用起来相对麻烦.幸好有人专门在做这一类事情,将科学计算所需要的模块都编译好,然后打包以发行版的形式供用户使用,Anaconda就是其中一个常用的科学计算发行版. 我们从网站(

Python科学计算(二)windows下开发环境搭建(当用pip安装出现Unable to find vcvarsall.bat)

用于科学计算Python语言真的是amazing! 方法一:直接安装集成好的软件 刚开始使用numpy.scipy这些模块的时候,图个方便直接使用了一个叫做Enthought的软件.Enthought是一家位于美国得克萨斯州首府奥斯汀的软件公司,主要使用Python从事科学计算工具的开发.Enthought里面包含了很多库,不需要你自己安装就可以直接使用了. 其实还又很多Python科学计算的集成软件,比如Python(x, y)和WinPython,个人感觉WinPython还是不错的,里面包

linux中安装python科学计算环境-numpy、scipy、matplotlib、OpenCV...

http://blog.csdn.net/pipisorry/article/details/39902327 在Ubuntu中安装numpy.scipy.matplotlib.OpenCV等 和Python(x,y)不一样,在Ubuntu中需要手工安装科学计算的各个模块, 如何安装IPython, NumPy, SciPy, matplotlib, PyQt4, Spyder, Cython, SWIG, ETS, OpenCV: 在Ubuntu下安装Python模块通常可以使用apt-get

Python下科学计算包numpy和SciPy的安装

转载自:http://blog.sina.com.cn/s/blog_62dfdc740101aoo6.html Python下大多数工具包的安装都很简单,只需要执行 “python setup.py install”命令即可.然而,由于SciPy和numpy这两个科学计算包的依赖关系较多,安装过程较为复杂.网上教程较为混乱,而且照着做基本都不能用.在仔细研读各个包里的README和INSTALL之后,终于安装成功.现记录如下. 系统环境: OS:RedHat5 Python版本:Python2

python安装numpy科学计算模块

解决两个问题: (1)Import Error: No module named numpy (2)Python version 2.7 required, which was not found in the registry (1)这种错误是因为没有安装numpy科学计算库,因此需要安装此模块. 首先下载正确的exe安装文件:numpy-MKL-1.8.0.win-amd64-py2.7.exe. 接着我们双加打开安装文件,点击运行按钮 安装过程很简单,点击下一步 在第一步,如果你看到自己的

Python下科学计算包numpy和SciPy的安装【原创】

Python下大多数工具包的安装都很简单,只需要执行 "python setup.py install"命令即可.然而,由于SciPy和numpy这两个科学计算包的依赖关系较多,安装过程较为复杂.网上教程较为混乱,而且照着做基本都不能用.在仔细研读各个包里的README和INSTALL之后,终于安装成功.现记录如下. 系统环境: OS:RedHat5 Python版本:Python2.7.3 gcc版本:4.1.2 各个安装包版本: scipy-0.11.0 numpy-1.6.2 n

ubuntu14.04 下安装 gsl 科学计算库

GSL(GNU Scientific Library)作为三大科学计算库之一,除了涵盖基本的线性代数,微分方程,积分,随机数,组合数,方程求根,多项式求根,排序等,还有模拟退火,快速傅里叶变换,小波,插值,基本样条,最小二乘拟合,特殊函数等.下面介绍一下GSL的安装和使用. 方法一: 首先从官网下载到源代码(我用的版本是 gsl-1.9)压缩包,解压后进入目录,执行 ./configure make make install 这个过程需要几分钟.这里还有一点需要注意的是,执行 make inst