help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave and OctSympy


From: Colin Macdonald
Subject: Re: Octave and OctSympy
Date: Sun, 29 Mar 2015 22:17:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 28/03/15 02:03, Chuck Allison wrote:
I’m not sure you may be able to assist me, but I am trying to use the
symbolic package (OctSympy) on Octave 3.8.0 on Mac OS X Yosemite. I
have installed the latest version from GitHub. I also have Python
2.7.9 installed with sympy also installed. For some reason, Octave
loads an older version of python (2.7.6) and can’t find sympy. Here
is the error stream I get in Octave:
>
pkg load symbolic symbols
error: 'symbols' undefined near line 1 column 1
syms x
OctSymPy v2.1.0: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe. Some
output from the Python subprocess (pid 11830) might appear next.
warning: fopen: file found in load path Python 2.7.6 (default, Sep  9
2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0
(clang-600.0.39)] on darwin Type "help", "copyright", "credits" or
"license" for more information.
Traceback (most recent call last):
File "<stdin>", line 2, in <module> ImportError: No module named
sympy Traceback (most recent call last): File "<stdin>", line 2, in
<module> NameError: name 'sympy' is not defined Traceback (most
recent call last): File "<stdin>", line 1, in <module> NameError:
name 'sympy' is not defined extractblock: read an error back from
python str1 = <type 'exceptions.ImportError'>

str2 = No module named sympy

error: error reading back from python error: called from: error:
/Users/chuck/octave/symbolic-2.1.0/private/extractblock.m at line
166, column 7 error:
/Users/chuck/octave/symbolic-2.1.0/private/extractblock.m at line 51,
column 14 error:
/Users/chuck/octave/symbolic-2.1.0/private/extractblock.m at line 13,
column 8 error:
/Users/chuck/octave/symbolic-2.1.0/private/python_ipc_popen2.m at
line 82,column 7 error:
/Users/chuck/octave/symbolic-2.1.0/private/python_ipc_driver.m at
line 30,column 13 error:
/Users/chuck/octave/symbolic-2.1.0/python_cmd.m at line 120, column
9 error:   /Users/chuck/octave/symbolic-2.1.0/@sym/sym.m at line 279,
column 5 error: evaluating argument list element number 3 error:
/Users/chuck/octave/symbolic-2.1.0/syms.m at line 157, column 9


Would you happen to know how to fix this issue, whether there is a
way to tell octsympy to load the correct version of Python, for
example?

Thank you!

Hi Chuck,

1.  You could try:

>> sympref python /path/to/your/preferred/python

Let me know if that works. If you open a terminal and type "python" which python interpreter does it start? I.e., it could be a problem with your path.

2. If you install it instead with "pkg install -forge symbolic" from within Octave, does that change anything? (probably not).

3. I've not personally tested it on a Mac, but others have told me it works so its at least possible!

Colin

P.s., I've CC'd address@hidden, hope that's ok. (But CC me on replies as I'm not subscribed).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]