[MacPorts] #55361: octave-symbolic @2.6.0_0: Python error when using octave-symbolic from the Octave.app GUI launched from the Finder

MacPorts noreply at macports.org
Sun Nov 19 15:07:29 UTC 2017


#55361: octave-symbolic @2.6.0_0: Python error when using octave-symbolic from the
Octave.app GUI launched from the Finder
--------------------+-------------------------------------------------
 Reporter:  maehne  |      Owner:
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.4.2
 Keywords:          |       Port:  octave-symbolic octave octave-devel
--------------------+-------------------------------------------------
 The octave-symbolic package works well if octave is launched from a
 regular shell:
 {{{
 $ octave --no-gui
 GNU Octave, version 4.3.0+
 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 "x86_64-apple-darwin17.x.x".

 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> pkg load symbolic
 octave:2> syms x
 OctSymPy v2.6.0: this is free software without warranty, see source.
 Initializing communication with SymPy using a popen2() pipe.
 Some output from the Python subprocess (pid 17224) might appear next.
 Python 3.6.3 (default, Oct  7 2017, 02:03:21)
 [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> >>>
 OctSymPy: Communication established.  SymPy v1.1.1.
 octave:3> f = x * cos(x)
 f = (sym) x⋅cos(x)
 octave:4> df = diff(f)
 df = (sym) -x⋅sin(x) + cos(x)
 octave:5> system("echo $PATH")
 /opt/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/local/sbin:/usr/sbin:/sbin:/opt/local/libexec/octave/4.3.0+/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/api-v51/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/site/exec/x86_64-apple-
 darwin17.2.0:/opt/local/libexec/octave/4.3.0+/exec/x86_64-apple-
 darwin17.2.0:/opt/local/bin
 ans = 0
 octave:6> system("which python")
 /opt/local/bin/python
 ans = 0
 }}}
 However, if one launches the Octave.app GUI from the Finder, the octave-
 symbolic package generates a Python error stating that it cannot import
 the Python package SymPy:
 {{{
 GNU Octave, version 4.3.0+
 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 "x86_64-apple-darwin17.x.x".

 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'.

 >> pkg load symbolic
 >> syms x
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
 ImportError: No module named sympy
 OctSymPy v2.6.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 59 column 13
     python_cmd at line 164 column 9
     valid_sym_assumptions at line 38 column 10
     assumptions at line 82 column 7
     syms at line 97 column 13
 >> system("echo $PATH")
 /usr/bin:/bin:/usr/sbin:/sbin:/opt/local/libexec/octave/4.3.0+/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/api-v51/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/site/exec/x86_64-apple-
 darwin17.2.0:/opt/local/libexec/octave/4.3.0+/exec/x86_64-apple-
 darwin17.2.0:/opt/local/bin:/opt/local/libexec/octave/4.3.0+/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/api-v51/site/exec/x86_64
 -apple-darwin17.2.0:/opt/local/libexec/octave/site/exec/x86_64-apple-
 darwin17.2.0:/opt/local/libexec/octave/4.3.0+/exec/x86_64-apple-
 darwin17.2.0:/opt/local/bin:/opt/local/share/octave/packages/symbolic-2.6.0/bin
 ans = 0
 >> system("which python")
 /usr/bin/python
 ans = 0
 }}}
 As illustrated by the {{{system("echo $PATH")}}} and the {{{system("which
 python")}}} calls, I suspect that the source of the problem is the loading
 of the wrong python interpreter due to the very differently set
 {{{PATH}}}.

 The above messages were produced by {{{octave-symbolic 2.6.0_0+python36}}}
 running in {{{ octave-devel
 @4.3.0+_14+accelerate+app+docs+fltk+gfortran+graphicsmagick+qt5+sound}}}.
 However, I did see the exact same error also with {{{octave @4.2.1_14}}}
 and the default {{{python27}}} variant of {{{octave-symbolic}}}. My
 platform is macOS High Sierra version 10.13.1 (17B48) on a MacBook Pro
 (15-inch, 2017) with 3.1 Intel Core i7.

--
Ticket URL: <https://trac.macports.org/ticket/55361>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list