AOSC loongarch64版的sympy有问题

如图所示,在python3里面“import sympy”出现错误。


gmpy2: update to 2.1.5 by jiegec · Pull Request #5758 · AOSC-Dev/aosc-os-abbs · GitHub


GNU Octave, version 9.1.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
FITNESS FOR A PARTICULAR PURPOSE. For details, type ‘warranty’.

Octave was configured for “loongarch64-aosc-linux-gnu”.

Home page:
Support resources: Support
Improve Octave: Get Involved

For changes from previous versions, type ‘news’.

octave:1> pkg load symbolic
octave:2> syms x
Symbolic pkg v3.1.1: /usr/lib/python3.10/site-packages/sympy/solvers/ SyntaxWarning: “is” with a literal. Did you mean “==”?
if feasible is 1: # it’s prime and k == 2
error: SymPy version 1.3 found but is too old (1.4 required)
Try “sympref diagnose” for more information.
error: called from
assert_have_python_and_sympy at line 168 column 9
python_ipc_popen2 at line 85 column 5
python_ipc_driver at line 62 column 15
pycall_sympy__ at line 164 column 11
valid_sym_assumptions at line 38 column 10
assumptions at line 82 column 7
syms at line 140 column 13
octave:3> sympref diagnose

Symbolic package diagnostics

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

The Python interpreter is currently: “python3”.

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 3, try
setenv PYTHON python3
sympref reset

Attempting to run python3 -c “print("Python says hello")”

status = 0
output = Python says hello

Good, Python ran correctly.

Python version

Let’s check what version of Python we are calling…

Attempting to run python3 -c “import sys; print(sys.version)”
status = 0
output = 3.10.13 (main, Apr 8 2024, 14:45:59) [GCC 13.2.0 20230727 (AOSC OS, Core)]

Running python3 -c “import sys; print(sys.executable)”
output = /usr/bin/python3

Checking if python3 is running in a Cygwin-like POSIX environment… no

System info

Platform: loongarch64-aosc-linux-gnu
Array Maximum Size: 9223372036854775807
Endianness: L
Architecture: gnu-linux-loongarch64

GNU Octave Version: 9.1.0 (hg id: d0c18b1446df)
GNU Octave License: GNU General Public License
Operating System: Linux 6.7.5-aosc-main #1 SMP PREEMPT_DYNAMIC Sun Mar 17 02:40:09 UTC 2024 loongarch64

Package Name | Version | Installation directory
symbolic *| 3.1.1 | /home/test/.local/share/octave/api-v59/packages/symbolic-3.1.1

SymPy Python Library

SymPy is a Python library used by Symbolic for almost all features.

Attempting to run python3 -c “import sympy; print(sympy.version)”

/usr/lib/python3.10/site-packages/sympy/solvers/ SyntaxWarning: “is” with a literal. Did you mean “==”?
if feasible is 1: # it’s prime and k == 2
status = 0
output = 1.3

SymPy must be at least version 1.4; you have version 1.3.
**** Your SymPy is too old! ****
Installed newer version already? Perhaps it was for a different Python?
Try “setenv” as described above to change your python interpreter.



您好,请测试 sympy-new 测试源:

oma topics --opt-in sympy-new


使用一切正常。多谢了 :grinning: :grinning: