Ask Your Question

Iguananaut's profile - activity

2021-05-01 19:44:24 +0200 received badge  Popular Question (source)
2020-12-07 10:58:01 +0200 commented question how to install Fricas in SageMath 9.2 W10?

What do you mean "it looks like the installation process will never stop"? What is it doing? It could be there is a bug in the dependency resolution causing it to rebuild dependencies that it shouldn't. But even if that's the case just let it run its course.

2020-11-18 15:00:33 +0200 commented question Unknown installation error in Windows

It could also be a CPU incompatibility. Sage for Windows is compiled with the current maximum level of CPU compatibility but there could be some outliers, or if it's a very new CPU it might break MPIR or something.

2020-11-18 14:59:20 +0200 commented answer Unknown installation error in Windows

This might be a Windows-specific quirk

It's not. They probably have BLODA

2020-11-18 14:58:10 +0200 commented question Unknown installation error in Windows

Chances are good you have BLODA. In particular some antivirus software is known to interfere with, or even delete files from Sage's installation since it's full of false-positives.

2020-10-13 09:17:31 +0200 received badge  Nice Question (source)
2020-10-12 16:06:18 +0200 commented question Use of threejs and jmol in sage 9.1 for windows
2020-10-12 16:02:37 +0200 asked a question Google sign-in broken

When signing into using Google I get

Authorization Error

Error 400: redirect_uri_mismatch The redirect URI in the request,, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit:

2020-09-16 09:07:41 +0200 received badge  Notable Question (source)
2020-09-13 17:51:03 +0200 received badge  Good Answer (source)
2020-09-02 17:58:50 +0200 received badge  Nice Answer (source)
2020-08-31 14:46:39 +0200 commented question Running sage (8.9) from command line (Windows)

Out of curiosity why do you want to do this? Sage is a UNIX-based program and not really designed to work well in the Windows cmd shell, as you can tell from the ugly colors alone. I also can't promise that various things like keyboard commands will work well. Is there some other underlying goal? If so, perhaps there is a better way to achieve that goal.

2020-08-05 01:11:27 +0200 received badge  Good Answer (source)
2020-08-03 22:25:19 +0200 received badge  Nice Answer (source)
2020-08-03 19:38:36 +0200 received badge  Necromancer (source)
2020-08-03 16:18:08 +0200 commented answer Running VIM inside Sage Shell

See the documentation for the %edit magic. It's a little confusing, but it does not work exactly the same as entering the code directly in the interactive prompt. If you just write a bare expression like 1 + 1, although it will be evaluated, its results are not displayed. Instead you have to write something like print(1 + 1) if you want the results displayed when executing the code. The %edit command outputs the code entered as a string allowing you to do things like %edit _ to re-edit the previous code.

2020-08-03 16:06:55 +0200 answered a question SageMath 9.1 for Windows

Sage 9.1 for Windows was released last week: Sorry for the long delay on this one.

2020-08-03 16:06:20 +0200 commented question SageMath 9.1 for Windows

@Emmanual Charpentier: The information in your last comment is a bit inaccurate. There have been SageMath for Windows releases for some time now: I know you know this because you directly referred to it. But it is what is meant by "SageMath for Windows". The fact that it uses Cygwin is a technical detail not relevant to most users (although sometimes good to be aware of for more intermediate users, especially when it comes to understanding how it maps UNIX paths to Windows paths and vice-versa).

@Masacroso: It shouldn't usually take several months, but right now I'm the only one building the Windows installer releases and I had some setbacks in my ability to build the 9.1 release. Usually it should be out within a week or so of the source release

2020-07-28 21:09:37 +0200 received badge  Great Question (source)
2020-06-19 14:48:46 +0200 edited question Plotting Fermat' s Spiral, which requires polar coordinates, r=2theta

Try Plotting Fermat' s Spiral, which requires polar coordinates, r=2theta?

2020-06-19 14:47:56 +0200 edited question find the root of tan(x)

Find the root of Tan(x)?

2020-04-27 23:44:15 +0200 received badge  Nice Answer (source)
2020-02-21 16:53:29 +0200 received badge  Popular Question (source)
2020-02-04 15:24:15 +0200 commented question Other than "Jupyter Notebook", is there any other way to use Sage?

You can find instructions for configuring PyCharm with sage here:

2020-02-03 16:28:48 +0200 commented answer Sagemath and Vscode

... I was able to run the interpreter. But I think there should be a better way. And it doesn't seem to work for commands like "Python: Start REPL". I need to reverse engineer how the Python extension searches for activate scripts, such as when it activates virtualenvs and conda envs, and see if the same mechanism can be used to load a sage-env. This issue also seems to be a problem: It might be best for a Sage environment to change the default shell to the bash that comes with Sage, but I don't know how to do that yet. Still figuring out how to configure VSCode and some of it is very confusing...

2020-02-03 16:26:21 +0200 commented answer Sagemath and Vscode

I don't think that's really the problem. I was able to set up a workspace where I set "python.pythonPath" to the windows path to Sage's Python interpreter. To get the Windows path, from the Sage shell you can run cygpath -m -a $(which python3), which in my case returns C:/Users/Erik M. Bray/AppData/Local/SageMath 9.0/runtime/opt/sagemath-9.0/local/bin/python3.7.exe. Putting this in "python.pythonPath" almost works, except the additional trick is that at the very least you also need to have the $PATH environment variable set properly. I was able to do this by creating a sage.env file like echo "$(cygpath -p -m "$PATH")" > sage.env, and then in my workspace settings set "python.envFile" to the path to that sage.env. This partly works....

2020-02-03 14:09:06 +0200 commented answer Sagemath and Vscode

I'm not exactly sure what you mean here: "it's not able to detect Sage's Python executable because VSCode uses import sys; print(sys.executable) to get the actual path". In order to run some code in a specific Python interpreter, doesn't it need to already know the path to that Python interpreter in the first case? In what context does VSCode do this? I think I actually have VSCode installed but I never use it, or if not I'll go ahead and install it and see what I can find out...

2020-02-03 14:06:15 +0200 commented question Problem with %attach for SageMath 9.0 on Windows 10 with .spyx files

Could you please post a piece of sample code which reproduces the problem for you? I can reproduce the problem with 8.9, but not with 9.0.

2020-01-31 21:39:20 +0200 received badge  Necromancer (source)
2020-01-31 18:27:10 +0200 commented answer Updating Sage in Windows 10

Hi, I'm not sure what you intended exactly by this answer but it appears to be misleading. Sage on Windows uses Cygwin. MinTTY is just a terminal emulator that is included in Cygwin, and is also the terminal emulator used by default when running Sage for Windows.

2020-01-31 18:25:24 +0200 answered a question Updating Sage in Windows 10

I forgot about this question, but just as a quick follow-up Jesus and I met last week at the University of Essex and I walked him through building Sage on Windows/Cygwin using the instructions at:

As we noted at the time, one bit of information currently missing from those instructions is to set:

export FFLAS_FFPACK_CONFIGURE=--disable-openmp

This is just to work around a slight defect in the build system that should get fixed at some point...

2020-01-31 18:21:37 +0200 commented question Problem with %attach for SageMath 9.0 on Windows 10 with .spyx files

I tried it on 9.0 and it does appear to be fixed. Compiling the spyx module is a little slow--slower than it should be for some reason--but it works.

2020-01-31 18:13:54 +0200 commented question Problem with %attach for SageMath 9.0 on Windows 10 with .spyx files

Have you tried 9.0? I believe this problem may be fixed in 9.0.

2020-01-31 18:11:30 +0200 commented question Download Ver 8.9

Where did you look? When you go to the download page and select a mirror and OS, each page lists old versions.

2020-01-31 18:10:09 +0200 edited question Download Ver 8.9

I need to download SageMath8.9 for a class, but online, the only version I can find for download is 9.0. Where can I download 8.9?


I need version 8.9 for a class, but I can only find links to download 9.0 online. Where can I find a download for 8.9?


2020-01-31 18:09:29 +0200 commented answer Sagemath and Vscode

Well done. Shame about the patch to tornado; I don't see another way around it until/unless it's fixed upstream.

One thing I'm a bit confused by: You seem to mention that VSCode comes with its own Python into which you can install Jupyter Notebook, and indeed you mention pip installing Jupyter. But then you say you're running the Jupyter Notebook that comes with Sage, so the previous copy of notebook is never actually used as far as I can tell...unless you're just using Sage Notebook to start the kernel?

It would be easier if you copied the sage/kernel.json to somewhere else (not modifying the Sage installation, which is a bit dangerous), and instead installed a copy of that kernel directly into the jupyter notebook you installed on your system kernel. Should work.

2020-01-23 16:45:28 +0200 commented answer Attempting to enrich quiver class yields "unexpected keyword argument" error

This is basically correct, and passing an arbitrary **kwargs to a subclass's constructor is a fairly common idiom. A couple (very minor) nitpicks where your code is non-idiomatic:

  • Python has a style guide called PEP-8, which is also used by Sage (see Sage Coding Conventions. Most of your code is already PEP-8 except the self._edgePairs. camelCase is not used for local variables or attributes; instead you could call this self._edge_pairs (like I said, very minor)
  • The line assert edge in self.edges() is unnecessary; if it isn't true the following line will raise a KeyError, which is more explicit than an AssertionError anyways.
2020-01-15 14:13:59 +0200 received badge  Necromancer (source)
2020-01-13 13:05:17 +0200 commented answer Working with units

astropy also has a very powerful units and quantities package which took much of its original inspiration from Pint. Actually, lately they've been converging more and more again on shared functionality (thanks in part to recent updates to Numpy making propagation of units easier)--I wonder if one day it will be possible for them to converge, rather than maintaining separate projects. Though astropy.units does have some more advanced functionality specific to the astronomy community (though also useful for most any science).

2020-01-13 13:00:59 +0200 edited question Generating and evaluating a polynomial

I woud like to create a polynomial P(x) = 1 + x + x^2 + ...... + x^50 and evaluate it for different values of x.

What would be a good way to do this without entering it by hand.

Thank you!

I am very new to Sage. I would like to create a polynomial and evaluate it for a certain x say x=1.00001

The polynomial is: P(x) = 1 + x + x^2 + ..... + x^50

Thank you for the help!

2020-01-09 14:58:21 +0200 commented answer Problem importing Sage library in Python script on Windows

If you can be more specific about what exactly you tried to do and where you got stuck I might be able to give a more precise answer.

2020-01-09 14:57:57 +0200 commented answer Problem importing Sage library in Python script on Windows

SageMath is really two things: There's what's referred to sometimes as "sagelib": the actual sage Python package, and then there's "Sage the Distribution" consisting of sagelib and all its dependencies. Though there's been some work done toward making Sage installable with pip like any Python package (there's no strong reason Sage needs its own Python interpreter) it's still non-trivial because you need most of the dependencies already in place. An (outdated) list of those dependencies is here. Some of those are optional, but many non-trivial ones are very integral. conda makes it seem easy because it can pull in all those dependencies, but outside that context it's not trivial.

2020-01-09 12:10:57 +0200 answered a question Problem importing Sage library in Python script on Windows

I'm not sure what you mean exactly by "using Sage in a Python script". You didn't really provide any details.

Sage has always traditionally included its own Python interpreter, and so using Sage meant you'd have to run the Python interpreter that comes with Sage (if you're at all familiar with conda as you say, this is a little like having its own conda environment). The folks who've packaged Sage for conda make that a little more transparent, since you can now install sage directly in a conda environment. But either way it's effectively similar.

What do I need to do with the installation to get my python script to find Sage?

You will need to run it with the Python interpreter that comes with Sage. If you have additional dependencies, as I wrote, this is a complete Python environment so you can pip install them using Sage's Python.

As an aside, is there a reason why there is no conda package for Sage on Windows, only Linux and MacOS?

Because Sage on Windows depends on Cygwin, and there is no official Cygwin target for conda. There could be, and it's something I would like there to be, but it would be a large effort for which there is currently no support.

But it seems completely incompatible for integration with other languages/tools.

Not necessarily but it is a little tricky. Search this site for other questions like this one where I explain how to use Sage in PyCharm--again it's not all that different from using a virtualenv; still just a little trickier. If you have any good ideas for how to make this easier I'm all for it.

When I looked at the log for that, it seems like there was a connection issue and the source could not be downloaded.

I noticed also there were some problems with some connection problems with some of the mirrors yesterday. Try just running make again and the build should resume where it left off. If you followed the instructions here it should work.

Sage is a complex beast: Its large set of non-standard and/or tightly-pinned dependencies makes it non-trivial to install and use compared to a normal Python package. People have been working hard for years to make that easier (see, again, your success with conda) but this is not easy. You're welcome to lend a hand if you have any insights.

2020-01-09 11:56:17 +0200 commented answer Should I avoid using unicode in names of variables?

IPython on Python 3, yes.