我已经安装了 miniconda python 3.6.1 版。conda、python、oct2py 和所有依赖包都是最新的。
python 和 octave 都是使用 64 位 Windows 二进制安装程序安装的。
在 python 脚本中
我只用
from oct2py import octave
我得到以下错误引用:
Traceback (most recent call last):
File "C:/Users/t-avben/PycharmProjects/TailGrpDelayAnalysis/main.py", line 7, in <module>
from oct2py import octave
File "C:\Program Files\Python36\lib\site-packages\oct2py\__init__.py", line 38, in <module>
octave = Oct2Py()
File "C:\Program Files\Python36\lib\site-packages\oct2py\core.py", line 73, in __init__
self.restart()
File "C:\Program Files\Python36\lib\site-packages\oct2py\core.py", line 508, in restart
logger=self.logger)
File "C:\Program Files\Python36\lib\site-packages\octave_kernel\kernel.py", line 144, in __init__
self.repl = self._create_repl()
File "C:\Program Files\Python36\lib\site-packages\octave_kernel\kernel.py", line 338, in _create_repl
version = subprocess.check_output(version_cmd).decode('utf-8')
File "C:\Program Files\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Program Files\Python36\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python36\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python36\lib\subprocess.py", line 990, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
我将 octave 二进制文件夹权限更改为所有用户的完全访问权限,并禁用了 Windows UAC。
有什么建议么?
编辑:
我已将 octave environemnt 变量设置为 octave.exe。
现在我有另一个奇怪的错误信息:
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\site-packages\pexpect\expect.py", line 99, in expect_loop
incoming = spawn.read_nonblocking(spawn.maxread, timeout)
File "C:\Program Files\Python36\lib\site-packages\pexpect\popen_spawn.py", line 66, in read_nonblocking
raise EOF('End Of File (EOF).')
pexpect.exceptions.EOF: End Of File (EOF).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/t-avben/PycharmProjects/TailGrpDelayAnalysis/main.py", line 7, in <module>
from oct2py import octave
File "C:\Program Files\Python36\lib\site-packages\oct2py\__init__.py", line 38, in <module>
octave = Oct2Py()
File "C:\Program Files\Python36\lib\site-packages\oct2py\core.py", line 73, in __init__
self.restart()
File "C:\Program Files\Python36\lib\site-packages\oct2py\core.py", line 508, in restart
logger=self.logger)
File "C:\Program Files\Python36\lib\site-packages\octave_kernel\kernel.py", line 144, in __init__
self.repl = self._create_repl()
File "C:\Program Files\Python36\lib\site-packages\octave_kernel\kernel.py", line 352, in _create_repl
stdin_prompt_regex=STDIN_PROMPT_REGEX)
File "C:\Program Files\Python36\lib\site-packages\metakernel\replwrap.py", line 90, in __init__
continuation_prompt_regex))
File "C:\Program Files\Python36\lib\site-packages\metakernel\replwrap.py", line 110, in set_prompt
self.child.expect(prompt_regex)
File "C:\Program Files\Python36\lib\site-packages\pexpect\spawnbase.py", line 321, in expect
timeout, searchwindowsize, async)
File "C:\Program Files\Python36\lib\site-packages\pexpect\spawnbase.py", line 345, in expect_list
return exp.expect_loop(timeout)
File "C:\Program Files\Python36\lib\site-packages\pexpect\expect.py", line 105, in expect_loop
return self.eof(e)
File "C:\Program Files\Python36\lib\site-packages\pexpect\expect.py", line 50, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF).
<pexpect.popen_spawn.PopenSpawn object at 0x00000184A0CF0240>
searcher: searcher_re:
0: re.compile("octave.*>")