【发布时间】:2017-02-17 17:49:42
【问题描述】:
在安装 octave、sympy(通过 anaconda)和符号包之后,我正尝试在 octave 中运行这一行作为脚本的一部分:
syms nn nb x
当我这样做时,我会收到此消息:
warning: the 'syms' function belongs to the symbolic package from Octave Forge
which you have installed but not loaded. To load the package, run `pkg
load symbolic' from the Octave prompt.
之后:
pkg load symbolic
syms nn nb x
我明白了:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "sympy/__init__.py", line 27, in <module>
raise ImportError("It appears 2to3 has been run on the codebase. Use "
ImportError: It appears 2to3 has been run on the codebase. Use Python 3 or get the original source code.
OctSymPy v2.4.0: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
error: Python cannot import SymPy: have you installed SymPy?
error: called from
assert_have_python_and_sympy at line 37 column 5
python_ipc_popen2 at line 78 column 5
python_ipc_driver at line 57 column 13
python_cmd at line 166 column 9
sym at line 365 column 5
syms at line 162 column 9
我正在使用 OSX El Capitan,并通过自制软件安装了 Octave。
老实说,我不知道这里发生了什么……是 octave 无法与 sympy 正常交流吗?如果是这样,我猜可能有一种简单的方法可以解决此问题?如果不是这样,我该怎么办?我愿意重启这个过程。
我想提前为任何格式问题道歉,这是我第一次问。我没有看到任何涉及此问题的问题,但如果我错过了一些明显的问题,我再次抱歉。
谢谢!
【问题讨论】: