error using simple solve example

201 views
Skip to first unread message

Paul Johnson

unread,
Aug 24, 2016, 5:47:40 AM8/24/16
to sage-support
Hi,

I've just started using Sage (sage-7.3-OSX_10.11.6-x86_64.app.dmg) on Mac OS X 10.11.6. The first solve example...
x = var('x')
solve
([x^2 - 3 == 0], x)
...gives the error below. Any advice greatly appreciated.

Best wishes,
Paul


Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>
 
File "_sage_input_20.py", line 10, in <module>
   
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCnNvbHZlKHheMiArIDMqeCArIDIsIHgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
   
  File "/private/var/folders/rk/qdw3mmfx7b953w6h3zyh287m0000gn/T/tmpgKDgig/___code___.py", line 4, in <module>
    exec compile(u'
solve(x**_sage_const_2  + _sage_const_3 *x + _sage_const_2 , x)
 
File "", line 1, in <module>
   
 
File "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/symbolic/relation.py", line 800, in solve
    ans
= f.solve(*args,**kwds)
 
File "sage/symbolic/expression.pyx", line 10679, in sage.symbolic.expression.Expression.solve (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/symbolic/expression.cpp:53735)
 
File "sage/symbolic/expression.pyx", line 802, in sage.symbolic.expression.Expression._maxima_ (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/symbolic/expression.cpp:7281)
 
File "sage/structure/sage_object.pyx", line 673, in sage.structure.sage_object.SageObject._interface_ (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/structure/sage_object.c:5506)
 
File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__getattr__ (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/misc/lazy_import.c:3486)
 
File "sage/misc/lazy_import.pyx", line 246, in sage.misc.lazy_import.LazyImport._get_object (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/misc/lazy_import.c:2241)
 
File "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 105, in <module>
    ecl_eval
("(set-locale-subdir)")
 
File "sage/libs/ecl.pyx", line 1315, in sage.libs.ecl.ecl_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:10158)
 
File "sage/libs/ecl.pyx", line 1330, in sage.libs.ecl.ecl_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:10097)
 
File "sage/libs/ecl.pyx", line 343, in sage.libs.ecl.ecl_safe_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:5162)
RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.



       

HG

unread,
Aug 24, 2016, 11:40:39 AM8/24/16
to sage-support
I tried your example on ubuntu 7.3 there is not problem. Seems to be a problem of locale (utf8), but sorry I don't know mac.

HG

unread,
Aug 24, 2016, 11:42:21 AM8/24/16
to sage-support
I forgot : try x=var("x")


Le mercredi 24 août 2016 11:47:40 UTC+2, Paul Johnson a écrit :

Robert Dodier

unread,
Aug 24, 2016, 4:37:49 PM8/24/16
to sage-s...@googlegroups.com
On 2016-08-24, Paul Johnson <pcdjo...@gmail.com> wrote:

> File "/Applications/SageMath-7.3.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 105, in <module>
> ecl_eval("(set-locale-subdir)")
> File "sage/libs/ecl.pyx", line 1315, in sage.libs.ecl.ecl_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:10158)
> File "sage/libs/ecl.pyx", line 1330, in sage.libs.ecl.ecl_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:10097)
> File "sage/libs/ecl.pyx", line 343, in sage.libs.ecl.ecl_safe_eval (/Applications/SageMath-7.3.app/Contents/Resources/sage/src/build/cythonized/sage/libs/ecl.c:5162)
> RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.

Well, Sage is punting 'solve' to Maxima, and it looks like Maxima isn't
loaded correctly or something. SET-LOCALE-SUBDIR isn't anything
important, it's only setting the subdirectory for the on-line
documentation. One could delete that call, but I'm guessing one would
then run into a similar error with the next call to a Maxima function.

Sorry I can't be more helpful,

Robert Dodier

Paul Johnson

unread,
Aug 24, 2016, 6:24:58 PM8/24/16
to sage-support
I tried this - didn't work, but thanks for the suggestion.

Paul Johnson

unread,
Aug 24, 2016, 6:35:03 PM8/24/16
to sage-support
Thanks. I tried installing Maxima from sourceforge. This didn't help, although I don't know if would be expected to.

I'd be interested to know if anyone else is able to run Sage on OS X El Capitan. Might an older version work? Or is the Maxima problem independent of the Sage version? E.g. this page says "The binaries for SageMath 6.10.beta7 will work":
http://ask.sagemath.org/question/31422/what-is-the-status-of-sage-on-os-x-1011-el-capitan/

Paul

Paul Masson

unread,
Sep 5, 2016, 3:05:15 PM9/5/16
to sage-support
Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:


This error has appeared before and installing these tools solved it. If that works for you, then please replay back so that I can start the process to fix the error again. Thanks!

FYI I run SageMath all the time on El Capitan, but I have the Command Line Tools installed so that I can compile from source code.

Paul Masson

unread,
Sep 7, 2016, 11:23:19 PM9/7/16
to sage-support
Reply all
Reply to author
Forward
0 new messages