Ask Your Question

(Reinstall to fix it?) Error to solve simple equation

asked 2016-11-09 14:34:59 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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)


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 "", line 10, in <module> exec compile(u'open("","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCnNvbHZlKFt4XjIgPT0gNF0seCk="),globals())+"\n"); execfile(os.path.abspath("")) File "", line 1, in <module>

File "/private/var/folders/n2/6_5dy4hd5bgdzxcmhrbygpfh0000gn/T/tmpw2yQAk/", line 4, in <module> exec compile(u'solve([x**_sage_const_2 == _sage_const_4 ],x) File "", line 1, in <module>

File "/Applications/", line 810, in solve return f[0].solve(args,*kwds) File "sage/symbolic/expression.pyx", line 10679, in sage.symbolic.expression.Expression.solve (/Applications/ File "sage/symbolic/expression.pyx", line 802, in sage.symbolic.expression.Expression._maxima_ (/Applications/ File "sage/structure/sage_object.pyx", line 673, in sage.structure.sage_object.SageObject._interface_ (/Applications/ File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__getattr__ (/Applications/ File "sage/misc/lazy_import.pyx", line 246, in sage.misc.lazy_import.LazyImport._get_object (/Applications/ File "/Applications/", line 105, in <module> ecl_eval("(set-locale-subdir)") File "sage/libs/ecl.pyx", line 1315, in sage.libs.ecl.ecl_eval (/Applications/ File "sage/libs/ecl.pyx", line 1330, in sage.libs.ecl.ecl_eval (/Applications/ File "sage/libs/ecl.pyx", line 343, in sage.libs.ecl.ecl_safe_eval (/Applications/ RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-11-09 15:39:20 -0600

For this previous Ask question 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

edit flag offensive delete link more


Be 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/
slelievre gravatar imageslelievre ( 2016-11-10 03:57:23 -0600 )edit

@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.

paulmasson gravatar imagepaulmasson ( 2016-11-10 14:58:54 -0600 )edit

The solution described here did not work for me. I am trying 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 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.

Mikhail gravatar imageMikhail ( 2017-02-13 15:20:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-11-09 14:34:59 -0600

Seen: 65 times

Last updated: Nov 09 '16