Results 1 to 5 of 5

Thread: octave errors while using syms

  1. #1
    Join Date
    May 2020
    Beans
    17
    Distro
    Kubuntu 20.04 Focal Fossa

    Question octave errors while using syms

    Hello,
    When I want to use e.g. syms x these two errors appear.

    Code:
    >> syms x
    error: 'python_ipc_popen2' undefined near line 62 column 15
    error: called from
        python_ipc_driver at line 62 column 13
        pycall_sympy__ at line 163 column 9
        valid_sym_assumptions at line 38 column 10
        assumptions at line 82 column 7
        syms at line 97 column 13
    Code:
    >> syms x
    Traceback (most recent call last):
      File "<stdin>", line 4, in <module>
      File "<stdin>", line 12, in octoutput_drv
      File "<stdin>", line 55, in octoutput
      File "/home/smhk/.local/lib/python3.6/site-packages/sympy/__init__.py", line 677, in __getattr__
        return getattr(self.mod, name)
    AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
    error: Python exception: AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
        occurred while copying variables to Python.
        Try "sympref reset" and repeat your command?
        (consider filing an issue at https://github.com/cbm755/octsympy/issues)
    error: called from
        pycall_sympy__ at line 191 column 5
        valid_sym_assumptions at line 38 column 10
        assumptions at line 82 column 7
        syms at line 97 column 13

  2. #2
    Join Date
    Aug 2013
    Beans
    4,370

    Re: octave errors while using syms

    From your output
    Python exception: AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
    Apparetly sympy breaks backward compatibility, so try to install an earlier version that works.
    Code:
    sudo pip3 install sympy==1.4
    Now in octave
    Code:
    >> pkg load symbolic
    >> sym x
    Symbolic pkg v2.9.0: Python communication link active, SymPy v1.4.
    ans = (sym) x
    >>
    Ubuntu20.04, octave 5.2.0

    P.S. I presume you are using Ubuntu 20.04, octave 5.2.0 (it is a good idea to tell people your ubuntu and software versions when you ask for help) and you installed sympy from the repo, which is version 1.5.x. You don't need to remove sympy from repo as it maybe a dependency of other things you installed with apt. pip installs sympy in /usr/local/lib which take precedence over the one installed by apt in /usr/lib at run time.
    Last edited by monkeybrain20122; May 25th, 2020 at 06:54 PM.

  3. #3
    Join Date
    May 2020
    Beans
    17
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: octave errors while using syms

    Thanks a lot.+1
    It is working well know

    P.S I am using octave4.2.2 and ubuntu18.04

  4. #4
    Join Date
    Aug 2013
    Beans
    4,370

    Re: octave errors while using syms

    I have tested that symbolic works with sympy 1.5 as well but not 1.6. Since you are in 18.04 so your repo's sympy may be too old rather than too new.

    If your problem is solved please go to thread tools and mark the thread as solved.

  5. #5
    Join Date
    Jul 2020
    Beans
    1

    Re: octave errors while using syms

    This solved my issue.

    Quote Originally Posted by monkeybrain20122 View Post
    From your output


    Apparetly sympy breaks backward compatibility, so try to install an earlier version that works.
    Code:
    sudo pip3 install sympy==1.4
    Now in octave
    Code:
    >> pkg load symbolic
    >> sym x
    Symbolic pkg v2.9.0: Python communication link active, SymPy v1.4.
    ans = (sym) x
    >>
    Ubuntu20.04, octave 5.2.0

    P.S. I presume you are using Ubuntu 20.04, octave 5.2.0 (it is a good idea to tell people your ubuntu and software versions when you ask for help) and you installed sympy from the repo, which is version 1.5.x. You don't need to remove sympy from repo as it maybe a dependency of other things you installed with apt. pip installs sympy in /usr/local/lib which take precedence over the one installed by apt in /usr/lib at run time.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •