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.Mon, 13 Feb 2017 22:20:48 +0100(Reinstall to fix it?) Error to solve simple equationhttps://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/I am running sagemath 7.3 on a MacBook air 2013 with MacOS Sierra 10.12.1 (downloaded .app.dmg) but I have the following issue:
When I try a simple 'solve' I get an error, literally I copy + paste the lines of an example. (I use the noteboom interface)
cell
x = var('x');solve([x^2 == 4],x)
output
RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.
I don't remember to have this issue in the past, (and OS upgrade get messy?) I check that Xcode is up-to-date and not sure if reinstalling it will fix it (currently doing this).
----------
The complete output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_5.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCnNvbHZlKFt4XjIgPT0gNF0seCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/n2/6_5dy4hd5bgdzxcmhrbygpfh0000gn/T/tmpw2yQAk/___code___.py", line 4, in <module>
exec compile(u'solve([x**_sage_const_2 == _sage_const_4 ],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 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.Wed, 09 Nov 2016 21:34:59 +0100https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/Answer by paulmasson for <p>I am running sagemath 7.3 on a MacBook air 2013 with MacOS Sierra 10.12.1 (downloaded .app.dmg) but I have the following issue:
When I try a simple 'solve' I get an error, literally I copy + paste the lines of an example. (I use the noteboom interface)
cell</p>
<pre><code>x = var('x');solve([x^2 == 4],x)
</code></pre>
<p>output </p>
<pre><code>RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.
</code></pre>
<p>I don't remember to have this issue in the past, (and OS upgrade get messy?) I check that Xcode is up-to-date and not sure if reinstalling it will fix it (currently doing this). </p>
<hr>
<p>The complete output:</p>
<p>Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_5.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -<em>- coding: utf-8 -</em>-\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCnNvbHZlKFt4XjIgPT0gNF0seCk="),globals())+"\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module></p>
<p>File "/private/var/folders/n2/6_5dy4hd5bgdzxcmhrbygpfh0000gn/T/tmpw2yQAk/___code___.py", line 4, in <module>
exec compile(u'solve([x**_sage_const_2 == _sage_const_4 ],x)
File "", line 1, in <module></p>
<p>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(<em>args,</em>*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.</p>
https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?answer=35497#post-id-35497For this previous [Ask question](https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/) the solution was to reinstall Command Line Tools at the command line with
xcode-select --install
and then delete the hidden directory `~/.sage` in your user's home directory before restarting SageMath.
This error was reported by me as https://trac.sagemath.org/ticket/21443.Wed, 09 Nov 2016 22:39:20 +0100https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?answer=35497#post-id-35497Comment by Mikhail for <p>For this previous <a href="https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/">Ask question</a> the solution was to reinstall Command Line Tools at the command line with</p>
<pre><code>xcode-select --install
</code></pre>
<p>and then delete the hidden directory <code>~/.sage</code> in your user's home directory before restarting SageMath.</p>
<p>This error was reported by me as <a href="https://trac.sagemath.org/ticket/21443">https://trac.sagemath.org/ticket/21443</a>.</p>
https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=36608#post-id-36608The solution described here did not work for me. I am trying sage-7.5.1-OSX_10.11.6-x86_64.app.dmg on macOS Sierra (10.12.3), and I installed the latest Command Line Tools (by running xcode-select --install with Xcode 8.2.1) just before Sage. (Running again xcode-select --install returns the error message "command line tools are already installed, use "Software Update" to install updates".) Removing users.pickle did not help, and I don't have sagenb.pid. Removing the entire directory ~/.sage had no effect either. Update: I gave up on the binaries and installed Sage 7.5.1 from the source code; it seems to work.Mon, 13 Feb 2017 22:20:48 +0100https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=36608#post-id-36608Comment by slelievre for <p>For this previous <a href="https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/">Ask question</a> the solution was to reinstall Command Line Tools at the command line with</p>
<pre><code>xcode-select --install
</code></pre>
<p>and then delete the hidden directory <code>~/.sage</code> in your user's home directory before restarting SageMath.</p>
<p>This error was reported by me as <a href="https://trac.sagemath.org/ticket/21443">https://trac.sagemath.org/ticket/21443</a>.</p>
https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=35503#post-id-35503Be careful, the directory `~/.sage` contains your sage notebook worksheets.
Having encountered similar problems in the past, it was enough to remove these files:
- `~/.sage/sage_notebook.sagenb/users.pickle`
- `~/.sage/sage_notebook.sagenb/sagenb.pid`Thu, 10 Nov 2016 10:57:23 +0100https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=35503#post-id-35503Comment by paulmasson for <p>For this previous <a href="https://ask.sagemath.org/question/34723/error-with-solve-on-mac-os-x-10116/">Ask question</a> the solution was to reinstall Command Line Tools at the command line with</p>
<pre><code>xcode-select --install
</code></pre>
<p>and then delete the hidden directory <code>~/.sage</code> in your user's home directory before restarting SageMath.</p>
<p>This error was reported by me as <a href="https://trac.sagemath.org/ticket/21443">https://trac.sagemath.org/ticket/21443</a>.</p>
https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=35511#post-id-35511@slelievre thanks for the clarification. The user on the previous question was brand new so this was a nonissue, but it is certainly relevant for upgrades. I've added the information to the Trac ticket and will keep it in mind when the question arises again.Thu, 10 Nov 2016 21:58:54 +0100https://ask.sagemath.org/question/35495/reinstall-to-fix-it-error-to-solve-simple-equation/?comment=35511#post-id-35511