ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 08 Sep 2016 05:22:29 +0200Error with Solve() on Mac OS X 10.11.6https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/Hello,
Downloaded Sage 7.3 (the ...64.app.dmg download) for the first time and learning the interface. I tried to solve a nonlinear equation of some complexity and got an error. I followed up with the following example from the Sage 7.3 tutorial manual:
g = var('g')
solve(g^2 + 3*g + 2, g)
and received this error (the same error as the equation of some complexity)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_60.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("WF9BID0gdmFyKCdYX0EnKQpERVEgPSAoRl9hMCkqKFhfQSkgPT0gVl9jCnNvbHZlKFtERVFdLCBYX0Ep"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/61/8zfqb4g12xl87lp5x2sk4g_r0000gn/T/tmpQtR_UQ/___code___.py", line 4, in <module>
exec compile(u'solve([DEQ], X_A)
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 810, in solve
return f[0].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.
Didn't get much luck with google searches on the exact cause of this, but some sources recommended installing Xcode or iPython, though I do not have any rational to connect the reccomended solution to the original problem.
Update:
I downloaded Xcode 7.3.1 and Command Tools per the instructions,(Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1).
First I downloaded Command Tools only, and tried Sage, and the result below occurred. Next I downloaded Xcode and initialized Xcode, it did not work either. In both cases the following errors occurred.
1st error on sage startup and running solve function
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_3.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZyA9IHZhcignZycpCnNvbHZlKGcrMSA9PSAwLCBnKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/61/8zfqb4g12xl87lp5x2sk4g_r0000gn/T/tmpvuE3ym/___code___.py", line 4, in <module>
exec compile(u'solve(g+_sage_const_1 == _sage_const_0 , g)
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 101, in <module>
ecl_eval("(require 'maxima)")
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: In function CAR, the value of the first argument is
#P"/Applications/SageMath-7.3.app/Contents/Resources/sage/local/var/tmp/sage/build/maxima-5.35.1.p2/src/src/numerical/f2cl-lib.lisp"
which is not of the expected type LIST
Compiling a second time yields a different error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_4.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZyA9IHZhcignZycpCnNvbHZlKGcrMSA9PSAwLCBnKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/61/8zfqb4g12xl87lp5x2sk4g_r0000gn/T/tmpcyBVlM/___code___.py", line 4, in <module>
exec compile(u'solve(g+_sage_const_1 == _sage_const_0 , g)
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.Mon, 05 Sep 2016 04:29:04 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/Answer by paulmasson for <div class="snippet"><p>Hello,</p>
<p>Downloaded Sage 7.3 (the ...64.app.dmg download) for the first time and learning the interface. I tried to solve a nonlinear equation of some complexity and got an error. I followed up with the following example from the Sage 7.3 tutorial manual:</p>
<pre><code>g = var('g')
solve(g^2 + 3*g + 2, g)
</code></pre>
<p>and received this error (the same error as the equation of some complexity)</p>
<pre><code>Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_60.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("WF9BID0gdmFyKCdYX0EnKQpERVEgPSAoRl9hMCkqKFhfQSkgPT0gVl9jCnNvbHZlKFtERVFdLCBYX0Ep"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/61/8zfqb4g12xl87lp5x2sk4g_r0000gn/T/tmpQtR_UQ/___code___.py", line 4, in <module>
exec compile(u'solve([DEQ], X_A)
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 810, in solve
return f[0].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.
</code></pre>
<p>Didn't get much luck with google searches on the exact cause of this, but some sources recommended installing Xcode or iPython, though I do not have any rational to connect the reccomended solution to the original problem.</p>
<p>Update:</p>
<p>I downloaded Xcode 7.3.1 and Command Tools per the instructions,(Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1). </p>
<p>First I downloaded Command Tools only, and tried Sage, and the result below occurred. Next I downloaded Xcode and initialized Xcode, it did not work ...<span class="expander"> <a>(more)</a></span></p></div> https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?answer=34731#post-id-34731Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:
http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation
This error has appeared [before](https://groups.google.com/forum/#!topic/sage-support/wj4ObDhv_xE) 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!Mon, 05 Sep 2016 21:03:08 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?answer=34731#post-id-34731Comment by Neek for <p>Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:</p>
<p><a href="http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation">http://doc.sagemath.org/html/en/insta...</a></p>
<p>This error has appeared <a href="https://groups.google.com/forum/#!topic/sage-support/wj4ObDhv_xE">before</a> 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!</p>
https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34740#post-id-34740I went ahead and added an update in the original problem description, this solution did not work (I followed to the best of my ability)Tue, 06 Sep 2016 00:39:26 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34740#post-id-34740Comment by paulmasson for <p>Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:</p>
<p><a href="http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation">http://doc.sagemath.org/html/en/insta...</a></p>
<p>This error has appeared <a href="https://groups.google.com/forum/#!topic/sage-support/wj4ObDhv_xE">before</a> 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!</p>
https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34742#post-id-34742I'm running El Capitan with Xcode and Command Line Tools both installed. I just downloaded the same .dmg file and the extracted .app solves the equation for me, so there should be a way to get it to work for you.
Since you've already installed Xcode, try reinstalling the Command Line Tools with the Terminal command `xcode-select --install` and give Sage another go. If that doesn't help, then try deleting the .app folder, extract Sage again from the .dmg file and try one more time.Tue, 06 Sep 2016 03:45:40 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34742#post-id-34742Comment by Neek for <p>Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:</p>
<p><a href="http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation">http://doc.sagemath.org/html/en/insta...</a></p>
<p>This error has appeared <a href="https://groups.google.com/forum/#!topic/sage-support/wj4ObDhv_xE">before</a> 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!</p>
https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34756#post-id-34756Uninstalled then reinstalled command line tools and re-executed. Did not work out.
i moved the sage app from my applications folder to trash then installed sage again, did not work out.
Then i tried
rm -rf "~/.sage/"
without quotes on sage and then opened sage, tried again, and it worked out.
Thanks for the help.Tue, 06 Sep 2016 22:32:58 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34756#post-id-34756Comment by paulmasson for <p>Although you shouldn't have to, please try installing the OS X Command Line Tools for Xcode as described here:</p>
<p><a href="http://doc.sagemath.org/html/en/installation/source.html#mac-os-x-prerequisite-installation">http://doc.sagemath.org/html/en/insta...</a></p>
<p>This error has appeared <a href="https://groups.google.com/forum/#!topic/sage-support/wj4ObDhv_xE">before</a> 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!</p>
https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34775#post-id-34775Glad you got it working. This error is now https://trac.sagemath.org/ticket/21443.Thu, 08 Sep 2016 05:22:29 +0200https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/?comment=34775#post-id-34775