'Octave Symbolic Package (macOS) - error python

Trying to run Octave on Mac with the Symbolic package After the install I ran a test (as shown in link above) by typing:

pkg load symbolic

syms x

However, I got an following error with syms x

octave:37> syms x
Symbolic pkg v2.9.0: sh: /usr/anaconda3/bin/python: No such file or directory
error: Cannot run the Python executable "/usr/anaconda3/bin/python"
      Try "sympref diagnose" for more information.
error: called from
      assert_have_python_and_sympy at line 61 column 7
      python_ipc_popen2 at line 79 column 5
      python_ipc_driver at line 62 column 15
      pycall_sympy__ at line 163 column 11
      valid_sym_assumptions at line 38 column 10
      assumptions at line 82 column 7
      syms at line 97 column 13
octave:37> 

I then tried sympref diagnose

octave:37> sympref diagnose

Symbolic package diagnostics
============================

Python and SymPy are needed for most features of the Symbolic package.

The Python interpreter is currently: "/usr/anaconda3/bin/python".

Computers may have more than one Python interpreter installed.  If you
need to, you can select a different one using the PYTHON environment
variable (see "help sympref").  For example, to use Python 2, try
setenv PYTHON python2
sympref reset

Attempting to run /usr/anaconda3/bin/python -c "print(\"Python says hello\")"

sh: /usr/anaconda3/bin/python: No such file or directory
status =  127
output = 

Unfortunately, that command failed!
We expected to see "status = 0" and "output = Python says hello".

* Is there an error message above?

* Do you have Python installed?

* Please try using "setenv" as described above.

I think it has to do with name of the python directory. there are 2 same questions: error: 'python_ipc_popen2' undefined near line 62 column 15 When running Octave

Installing Octave Symbolic Package using SymPy (macOS) - Can't get SymPy to work

Thanks in advance

Also if i remove anaconda:

octave:1> pkg load symbolic
octave:2> syms x
Symbolic pkg v2.9.0: sh: /Users/usr/octave/symbolic- 2.9.0/bin/py27.exe: Permission denied
error: Cannot run the Python executable "py27.exe"
      Try "sympref diagnose" for more information.
error: called from
      assert_have_python_and_sympy at line 61 column 7
      python_ipc_popen2 at line 79 column 5
      python_ipc_driver at line 62 column 15
      pycall_sympy__ at line 163 column 11
      valid_sym_assumptions at line 38 column 10
      assumptions at line 82 column 7
      syms at line 97 column 13
octave:2> sympref diagnose

Symbolic package diagnostics
============================

Python and SymPy are needed for most features of the Symbolic package.

The Python interpreter is currently: "py27.exe".

Computers may have more than one Python interpreter installed.  If you
need to, you can select a different one using the PYTHON environment
variable (see "help sympref").  For example, to use Python 2, try
  setenv PYTHON python2
  sympref reset

Attempting to run py27.exe -c "print(\"Python says hello\")"

sh: /Users/usr/octave/symbolic-2.9.0/bin/py27.exe: Permission denied
status =  126
output = 

Unfortunately, that command failed!
We expected to see "status = 0" and "output = Python says hello".

 * Is there an error message above?

 * Do you have Python installed?

 * Please try using "setenv" as described above.

 * Most systems search the PATH environment when looking for commands.


Solution 1:[1]

The problem seems disappeared if you upgrade from Octave 6.3 to a higher version of Octave in windows but I have not tested in Mac OS. However, Octave still lacks of fplot3 function for 3d curve plotting etc.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kai Shun Lam