Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#45682 - [sagemath] needs to depend on python2-pexpect

Attached to Project: Community Packages
Opened by Ruben Van Boxem (rubenvb) - Friday, 17 July 2015, 10:00 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 18 July 2015, 07:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Using Sage special function

Additional info:
sagemath 6.7-3
python2 2.7.10-1

Steps to reproduce:
Running this script in python2:
---
from sage.functions.special import elliptic_pi
print(elliptic_pi(1, pi/4, 1))
---
results in this error:
---
Setting permissions of DOT_SAGE directory so only you can read and write it.
Traceback (most recent call last):
File "solenoid_phase.py", line 8, in <module>
from sage.functions.special import elliptic_pi
File "/usr/lib/python2.7/site-packages/sage/functions/__init__.py", line 1, in <module>
import all
File "/usr/lib/python2.7/site-packages/sage/functions/all.py", line 1, in <module>
from piecewise import piecewise, Piecewise
File "/usr/lib/python2.7/site-packages/sage/functions/piecewise.py", line 71, in <module>
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
File "/usr/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 38, in <module>
import sage.rings.padics.padic_base_leaves as padic_base_leaves
File "/usr/lib/python2.7/site-packages/sage/rings/padics/padic_base_leaves.py", line 191, in <module>
from generic_nodes import pAdicFieldBaseGeneric, \
File "/usr/lib/python2.7/site-packages/sage/rings/padics/generic_nodes.py", line 24, in <module>
from sage.rings.padics.local_generic import LocalGeneric
File "/usr/lib/python2.7/site-packages/sage/rings/padics/local_generic.py", line 26, in <module>
from sage.rings.integer import Integer
File "sage/rings/rational.pxd", line 10, in init sage.rings.integer (build/cythonized/sage/rings/integer.c:47210)
File "sage/rings/rational.pyx", line 59, in init sage.rings.rational (build/cythonized/sage/rings/rational.c:35590)
File "/usr/lib/python2.7/site-packages/sage/rings/rational_field.py", line 55, in <module>
import infinity
File "/usr/lib/python2.7/site-packages/sage/rings/infinity.py", line 219, in <module>
from sage.rings.integer_ring import ZZ
File "sage/rings/integer_ring.pyx", line 56, in init sage.rings.integer_ring (build/cythonized/sage/rings/integer_ring.c:14151)
File "/usr/lib/python2.7/site-packages/sage/rings/ideal.py", line 36, in <module>
from sage.interfaces.singular import singular as singular_default
File "/usr/lib/python2.7/site-packages/sage/interfaces/singular.py", line 336, in <module>
from expect import Expect, ExpectElement, FunctionElement, ExpectFunction
File "/usr/lib/python2.7/site-packages/sage/interfaces/expect.py", line 58, in <module>
import pexpect
ImportError: No module named pexpect
---
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 18 July 2015, 07:54 GMT
Reason for closing:  Upstream
Comment by Ruben Van Boxem (rubenvb) - Friday, 17 July 2015, 10:01 GMT
Hmm, the description was cut a bit short: using special functions triggers a missing module pexpect error.
Comment by Antonio Rojas (arojas) - Friday, 17 July 2015, 22:52 GMT
pexpect 3 causes multiple issues with Sage, that's why it ships its own version of pexpect. Unfortunately this doesn't work out of the box from pure python. Work is underway to port Sage to pexpect 3, see http://trac.sagemath.org/ticket/10295
In the meantime, you should add /usr/lib/sage/site-packages to PYTHONPATH if you want to import sage from a python script.
Comment by Antonio Rojas (arojas) - Saturday, 18 July 2015, 07:53 GMT
Also note that running sage code from plain python is not really supported. If you try to run your script with the python included in upstream's pre-built package, you will also get an error "ImportError: cannot import name ZZ". Use "sage foo.py" instead.

Loading...