私はpython 2.7でubuntuを使用しています
ドキュメントによると、ipython からオクターブを実行できるはずです。
%install_ext octavemagic
%load_ext octavemagic
('The file must have a .py or .zip extension', u'octavemagic')
私が試してみると:
%install_ext bash.py
IOError Traceback (most recent call last)
<ipython-input-5-36b60e02c7c6> in <module>()
----> 1 get_ipython().magic(u'install_ext bash.py')
ここで完全なトレース
%lsmagic
多くの魔法を与え、私は試し%%timeit arange(1000)
てみましたが、うまくいきました。
最後に、ノートブックではなく、ipython コマンドラインで魔法をテストしました。%octave x = [1,2;3,4]
うまくいきました。
ipythonノートブックからオクターブを実行したいと思っています。どこで調査するかについてのアイデアはありますか?
octavemagic.py は、<myinstall_directory>/IPython/extensions/octavemagic.py
私が試して失敗した他のものと同じです。私の手順: http://ipython.org/ipython-doc/stable/config/extensions/octavemagic.htmlによると
- $ easy_install oct2py (問題ありません)
$ easy_install h5py
h5py/api_compat.h:21:18: fatal error: hdf5.h: No such file or directory
(私はいくつかの場所にそれを持っています (オクターブと別のサードパーティのライブラリ。h5py が hdf5.h に関して壊れていると言う他の人を見つけたので、完全な lib-dev インストールを試みました)$sudo apt-get libhdf5-serial-dev $sudo easy_install h5py インストール済み /usr/local/lib/python2.7/dist-packages/h5py-2.0.1-py2.7-linux-x86_64.egg h5py の依存関係の処理が完了しましたh5py の依存関係の処理
シン (ノートブックのみ?) バージョンの ipython があることがわかったので、git からソースをインストールしてビルドしました。はい。私はそれを構築しました。8)
sudo easy_install nose pexpect irunner and ipython-dev
ipython notebook -pylab inline
%magic octavemagic を除いて、ノートブックが起動し、動作します。また、 %magic bash やその他のいくつかでは機能しません