# AOSC loongarch64版的sympy有问题

**URL:** <https://bbs.aosc.io/t/topic/90>\
**Category:** 综合\
**Created:** [2024 年4 月 21 日 09:07 UTC](https://bbs.aosc.io/t/topic/90 "2024-04-21T09:07:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![azure](https://bbs.aosc.io/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@azure](https://bbs.aosc.io/u/azure)\
**Post date:** [2024 年4 月 21 日 09:07 UTC](https://bbs.aosc.io/t/topic/90/1 "2024-04-21T09:07:01Z")

</div>

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

 ![sympy](https://bbs.aosc.io/uploads/default/original/1X/88824865baa393a22e387a46f43d264ac34ab79e.png)

---

<div class="post-metadata">

**Author:** ![白铭骢](https://bbs.aosc.io/user_avatar/bbs.aosc.io/%E7%99%BD%E9%93%AD%E9%AA%A2/32/12_2.png) [@白铭骢](https://bbs.aosc.io/u/%E7%99%BD%E9%93%AD%E9%AA%A2)\
**Post date:** [2024 年4 月 24 日 07:40 UTC](https://bbs.aosc.io/t/topic/90/2 "2024-04-24T07:40:10Z")

</div>

感谢报告，我们会尽快修复

---

<div class="post-metadata">

**Author:** ![jiegec](https://bbs.aosc.io/user_avatar/bbs.aosc.io/jiegec/32/29_2.png) [@jiegec](https://bbs.aosc.io/u/jiegec)\
**Post date:** [2024 年4 月 24 日 07:50 UTC](https://bbs.aosc.io/t/topic/90/3 "2024-04-24T07:50:59Z")

</div>

见 [gmpy2: update to 2.1.5 by jiegec · Pull Request #5758 · AOSC-Dev/aosc-os-abbs · GitHub](https://github.com/AOSC-Dev/aosc-os-abbs/pull/5758)

---

<div class="post-metadata">

**Author:** ![azure](https://bbs.aosc.io/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@azure](https://bbs.aosc.io/u/azure)\
**Post date:** [2024 年4 月 24 日 10:55 UTC](https://bbs.aosc.io/t/topic/90/4 "2024-04-24T10:55:28Z")

</div>

谢谢！现在sympy本身是没问题了。我其实是尝试用octave的symbolic包做符号计算，sympy通了之后还是有问题，octave要求sympy版本至少为1.4。运行时的信息如下：

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.  
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or  
FITNESS FOR A PARTICULAR PURPOSE. For details, type ‘warranty’.

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

Home page: [https://octave.org](https://octave.org)  
Support resources: [Support](https://octave.org/support)  
Improve Octave: [Get Involved](https://octave.org/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/diophantine.py:3188: 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/diophantine.py:3188: 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.

不知AOSC的sympy版本是否有可能做一点升级？谢谢！

---

<div class="post-metadata">

**Author:** ![白铭骢](https://bbs.aosc.io/user_avatar/bbs.aosc.io/%E7%99%BD%E9%93%AD%E9%AA%A2/32/12_2.png) [@白铭骢](https://bbs.aosc.io/u/%E7%99%BD%E9%93%AD%E9%AA%A2)\
**Post date:** [2024 年4 月 25 日 05:24 UTC](https://bbs.aosc.io/t/topic/90/5 "2024-04-25T05:24:34Z")

</div>

能行，这就安排！

---

<div class="post-metadata">

**Author:** ![白铭骢](https://bbs.aosc.io/user_avatar/bbs.aosc.io/%E7%99%BD%E9%93%AD%E9%AA%A2/32/12_2.png) [@白铭骢](https://bbs.aosc.io/u/%E7%99%BD%E9%93%AD%E9%AA%A2)\
**Post date:** [2024 年4 月 26 日 06:44 UTC](https://bbs.aosc.io/t/topic/90/6 "2024-04-26T06:44:08Z")

</div>

您好，请测试 `sympy-new` 测试源：

```bash
oma topics --opt-in sympy-new

```

---

<div class="post-metadata">

**Author:** ![白铭骢](https://bbs.aosc.io/user_avatar/bbs.aosc.io/%E7%99%BD%E9%93%AD%E9%AA%A2/32/12_2.png) [@白铭骢](https://bbs.aosc.io/u/%E7%99%BD%E9%93%AD%E9%AA%A2)\
**Post date:** [2024 年4 月 26 日 07:50 UTC](https://bbs.aosc.io/t/topic/90/7 "2024-04-26T07:50:57Z")

</div>

您好，该更新已推送稳定源，祝您使用愉快

---

<div class="post-metadata">

**Author:** ![azure](https://bbs.aosc.io/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@azure](https://bbs.aosc.io/u/azure)\
**Post date:** [2024 年4 月 26 日 08:03 UTC](https://bbs.aosc.io/t/topic/90/8 "2024-04-26T08:03:05Z")

</div>

使用一切正常。多谢了 😀 😀
