Symbolic Package Problems

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Symbolic Package Problems

Thomas D. Dean-2
I can not get symbolic to work either with python 2.7.18 or python3.
Any ideas?

 > PYTHON=python3 octave
GNU Octave, version 6.1.1
Copyright (C) 2020 The Octave Project Developers.
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-pc-linux-gnu".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://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> x=sym('x')
Symbolic pkg v2.9.0:
/usr/local/lib/python3.8/dist-packages/sympy/__init__.py:672:
SymPyDeprecationWarning:

importing sympy.core.compatibility with 'from sympy import *' has been
deprecated since SymPy 1.6. Use import sympy.core.compatibility
instead. See https://github.com/sympy/sympy/issues/18245 for more
info.

   self.Warn(
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "<stdin>", line 12, in octoutput_drv
   File "<stdin>", line 54, in octoutput
   File "<stdin>", line 55, in octoutput
   File "/usr/local/lib/python3.8/dist-packages/sympy/__init__.py", line
677, in __getattr__
     return getattr(self.mod, name)
AttributeError: module 'sympy.core.compatibility' has no attribute
'integer_types'
Waiting...............warning: readblock: timeout of 30 exceeded,
breaking out
warning: called from
     readblock at line 101 column 7
     python_ipc_popen2 at line 99 column 16
     python_ipc_driver at line 62 column 15
     pycall_sympy__ at line 163 column 11
     sym at line 452 column 9

no output so far

error: ipc_popen2: something wrong? timed out starting python
error: called from
     python_ipc_popen2 at line 101 column 7
     python_ipc_driver at line 62 column 15
     pycall_sympy__ at line 163 column 11
     sym at line 452 column 9


Reply | Threaded
Open this post in threaded view
|

Re: Symbolic Package Problems

siko1056
On 2/21/21 1:17 PM, Thomas D. Dean wrote:

> I can not get symbolic to work either with python 2.7.18 or python3.
> Any ideas?
>
>  > PYTHON=python3 octave
> GNU Octave, version 6.1.1
> Copyright (C) 2020 The Octave Project Developers.
> 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-pc-linux-gnu".
>
> Additional information about Octave is available at https://www.octave.org.
>
> Please contribute if you find this software useful.
> For more information, visit https://www.octave.org/get-involved.html
>
> Read https://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> x=sym('x')
> Symbolic pkg v2.9.0:
> /usr/local/lib/python3.8/dist-packages/sympy/__init__.py:672:
> SymPyDeprecationWarning:
>
> importing sympy.core.compatibility with 'from sympy import *' has been
> deprecated since SymPy 1.6. Use import sympy.core.compatibility
> instead. See https://github.com/sympy/sympy/issues/18245 for more
> info.
>
>    self.Warn(
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "<stdin>", line 12, in octoutput_drv
>    File "<stdin>", line 54, in octoutput
>    File "<stdin>", line 55, in octoutput
>    File "/usr/local/lib/python3.8/dist-packages/sympy/__init__.py", line
> 677, in __getattr__
>      return getattr(self.mod, name)
> AttributeError: module 'sympy.core.compatibility' has no attribute
> 'integer_types'
> Waiting...............warning: readblock: timeout of 30 exceeded,
> breaking out
> warning: called from
>      readblock at line 101 column 7
>      python_ipc_popen2 at line 99 column 16
>      python_ipc_driver at line 62 column 15
>      pycall_sympy__ at line 163 column 11
>      sym at line 452 column 9
>
> no output so far
>
> error: ipc_popen2: something wrong? timed out starting python
> error: called from
>      python_ipc_popen2 at line 101 column 7
>      python_ipc_driver at line 62 column 15
>      pycall_sympy__ at line 163 column 11
>      sym at line 452 column 9
>
>


You are not alone =)  A long standing, well-known problem:
https://octave.discourse.group/t/symbolic-package-error-with-sympy-1-6-or-newer/295

HTH,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: Symbolic Package Problems

Thomas D. Dean-2
In reply to this post by Thomas D. Dean-2
On 2021-02-20 20:17, Thomas D. Dean wrote:
> I can not get symbolic to work either with python 2.7.18 or python3.
> Any ideas?
>
>  > PYTHON=python3 octave

<snip>

I found an answer.  On github, isue # 1031
   pip install sympy==1.5.1

This solved the problem with octave 6.1.1 (hg id: 59696b24ea53) and
newest symbolic.

Now, I have a printing problem.  from the example on github,

 > pkg load symbolic
 > syms x y z a b c k
 > A = [[sin(x/2) floor(a^(x*c)); acosh(2*x/pi) ceil(sin(x/gamma(x)))]]
A = (sym 2×2 matrix)

   ⎡     ⎛x⎞      ⎢ c⋅x⎥   ⎤
   ⎢  sin⎜─⎟      ⎣a   ⎦   ⎥
   ⎢     ⎝2⎠               ⎥
   ⎢                       ⎥
   ⎢     ⎛2⋅x⎞  ⎡   ⎛ x  ⎞⎤⎥
   ⎢acosh⎜───⎟  ⎢sin⎜────⎟⎥⎥
   ⎣     ⎝ π ⎠  ⎢   ⎝Γ(x)⎠⎥⎦

Here, cut and paste shows the correct characters.  However on my xterm,
in octave, most of the characters show up as a 'dot-box' character.  I
seem to remember a simple fix, but, what?

Any ideas

Tom Dean


Reply | Threaded
Open this post in threaded view
|

Re: Symbolic Package Problems

Thomas D. Dean-2
In reply to this post by siko1056
On 2021-02-20 20:41, Kai Torben Ohlhus wrote:

I solver the character problem.  Change the xterm font to anything other
than default.  I use large.

Tom Dean