oct2py导入成功,任何对oct2py的调用都会导致python

时间:2016-04-09 00:40:27

标签: python octave oct2py

我将C:\ Octave \ Octave-4.0.1 \ bin添加到我的PATH并且可以成功导入oct2py,但后续调用oct2py会使python内核崩溃。内核在命令行python,IPython和Spyder中崩溃。

示例代码:

from oct2py import Oct2Py    # works with no errors
oc = Oct2Py(executable="C:/Octave/Octave-4.0.1/bin/octave-cli.exe")  # also no errors
oc = Oct2Py()  # also returns with no errors.

y = oc.zeros(3,3)   # instantly kills the python

我已尝试使用默认的Oct2Py工厂并尝试使用可执行文件对其进行初始化,但似乎都没有。

内核爆炸的速度感觉就像某种链接错误,但我不确定。

以下是我的Python和Octave版本:

Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
GNU Octave, version 4.0.1
Copyright (C) 2016 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

 Octave was configured for "i686-w64-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1>

更新:

我发现我可以将数据推送到Octave(例如,oc.push('y',5)创建一个.mat临时文件,变量y赋值为5),但是拉数据(例如,oc.pull) ('y'))杀死了蟒蛇。

0 个答案:

没有答案