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.Tue, 01 Dec 2020 19:28:27 +0100Downloading thousands of plots from a server sage notebook?https://ask.sagemath.org/question/54495/downloading-thousands-of-plots-from-a-server-sage-notebook/Hello! I made a few thousand 2D plots on an online sage notebook (legacy notebook, not jupyter). They are stored in a list. The computation took over a week and I'd like to avoid having to rerun.
What's the best way to download all of these plots as PNG files?
In the past, I have hacked it by looping over the list and .show()'ing the plots, downloading the notebook's HTML file, and cutting the plots from the directory (don't laugh). Usually showing a few hundred plots takes a while to show and I'm worried it may run out of memory and crash in this case.
Thanks in advance!
Edit: I should also mention I am not an admin on the server.TheHiggsBozoTue, 01 Dec 2020 19:28:27 +0100https://ask.sagemath.org/question/54495/how to move from notebook() to jupyterhttps://ask.sagemath.org/question/53463/how-to-move-from-notebook-to-jupyter/Seems that I missed a lot since I used sage the last time. I had to learn the hard way that notebook() will not work anymore in 9.1. With some hickups I managed to start jupyter using
> sage -n jupyter --ip 127.0.0.1
but the main jupyter page leaves me clueless.
It shows a listing of my sage root directory. How to configure it to look at ~/.sage (which is outside of this tree)? And, asking in advance, how to use my old notebooks? It seems that the notebook() function has changed to export something (for jupyter?), but instead it just complains about "ValueError: History is empty, cannot export". I moved my old .sage dir, the message is not related to the old content.
I didn not find suitable documentation. Where can I find a guide how to move from sageNB to jupyter and how to use it?
thanksgg@gTue, 15 Sep 2020 21:14:22 +0200https://ask.sagemath.org/question/53463/output.txt not updatedhttps://ask.sagemath.org/question/31579/outputtxt-not-updated/I made some calculations in the SageMath notebook and got a message "WARNING: Output truncated! " with a link to "full_output.txt".
Then, I made some changes and ran the same calculation again. I got a similar message, but when I clicked the link, I saw the old full_output.txt file - without my changes.
How can I tell SageMath notebook to stop caching the file and create a fresh file?Erel Segal-HaleviTue, 15 Dec 2015 13:20:55 +0100https://ask.sagemath.org/question/31579/Cannot use pip because pip is configured with locations that require TLS/SSLhttps://ask.sagemath.org/question/35486/cannot-use-pip-because-pip-is-configured-with-locations-that-require-tlsssl/I installed pip by `sage -i pip`, but when I use pip to install some python packages, it always gives the following error message:
```
sys:1: RuntimeWarning: not adding directory '' to sys.path since everybody can write to it.
Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting octave_kernel
Could not fetch URL https://pypi.python.org/simple/octave-kernel/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement octave_kernel (from versions: )
No matching distribution found for octave_kernel
```
Then I followed [this post](https://groups.google.com/forum/#!topic/sage-support/c2fm64j55Jk) which says `./sage -i pyopenssl`, but this step fails for me also.edenharderTue, 08 Nov 2016 20:08:48 +0100https://ask.sagemath.org/question/35486/Sage on Windows 10 becomes corrupthttps://ask.sagemath.org/question/52394/sage-on-windows-10-becomes-corrupt/Since yesterday, I have the following problem : my notebooks cannot be connected to Sage. I have completely erased Sage and Python of my computer and then reinstalled them. So I work, under Windows 10, with the last version of both of it. For a short moment it seems to work but the the problem reappears. Has any body experimented such a weird comportment which may be due to windows ?
Here is an image of the error prompted by the notebook Server
![image description](/upfiles/1594304284310490.png)
I would add that, when I click on the icone Sagemath, a consol opens and closes ilmmediately and that Python is perfectly installed and works.CyrilleThu, 09 Jul 2020 16:13:58 +0200https://ask.sagemath.org/question/52394/ipynb notebook for Beezer's Linear Algebra supplementhttps://ask.sagemath.org/question/52446/ipynb-notebook-for-beezers-linear-algebra-supplement/I'm reading Beezer's Sagemath workbook that accompanies his Linear Algebra book. He says there is a Sagemath format
workbook that is more usable than the pdf. I've searched Everywhere including his page and every referenced page, but can't find it to download. Anyone know where it is? I don't know why he'd mention there is an ipynb notebook but make it impossible to find 😀cybervigilanteMon, 13 Jul 2020 00:45:30 +0200https://ask.sagemath.org/question/52446/Navigation inside a notebookhttps://ask.sagemath.org/question/51444/navigation-inside-a-notebook/ Is there a way inside a notebook to make reference to a graphic or a calculation to navigate later to it and back.CyrilleMon, 18 May 2020 11:31:44 +0200https://ask.sagemath.org/question/51444/Run a notebook from consolehttps://ask.sagemath.org/question/51338/run-a-notebook-from-console/Certainly a stupid question but is it possible to run a notebook from console? And how ?CyrilleSat, 09 May 2020 11:59:39 +0200https://ask.sagemath.org/question/51338/sagemath 8.6 could not work normally on mac 10.14.3https://ask.sagemath.org/question/45350/sagemath-86-could-not-work-normally-on-mac-10143/Command line works,
but the sagemath application could not open a notebook,
and it barely respond,
i think some issues may occur with GUI.ifeelok92Thu, 07 Feb 2019 05:02:03 +0100https://ask.sagemath.org/question/45350/How to remove PID of defunct notebook server?https://ask.sagemath.org/question/48372/how-to-remove-pid-of-defunct-notebook-server/ Hi Sage users
It looks like a system crash left a lock file for a sage notebook server. I cannot run the notebook:
Another Sage Notebook server is running, PID 2128.
Opening web browser at http://localhost:8080/ ...
Does anyone know where this lock file is or what the procedure is to clear up this error?
I have no PID 2128 running at the time this error occurs. Hence I think it is some lock file or ressource that needs to be freed or deleted.
Thanks
PatPatBWed, 16 Oct 2019 18:31:47 +0200https://ask.sagemath.org/question/48372/interact PB on W10 notebook SageMath 8.7https://ask.sagemath.org/question/47221/interact-pb-on-w10-notebook-sagemath-87/HI
on W10 Sagemath 8.7 notebook.
I get an error every time I click on the run button, but the error disappears if I change one of the three values in the little boxes. It looks like the vector is not initialized a first run, what do I need to change ?
@interact
def _(v=('vector', input_grid(1, 3, default=[[1,2,3]], to_value=lambda x: vector(matrix(flatten(x)))))):
print(v.norm())
TypeError: unable to convert ['vector', Grid(value=['vector', Grid(value=[...], children=(Label(value=u'vector'), VBox(children=(EvalText(value=u'1', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'2', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'3', layout=Layout(max_width=u'5em')),))))], children=(Label(value=u'vector'), VBox(children=(EvalText(value=u'1', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'2', layout=Layout(max_width=u'5em')),)), VBox(children=(EvalText(value=u'3', layout=Layout(max_width=u'5em')),))))] to a matrix
but this code above produce no error every time I click on evaluate on https://sagecell.sagemath.org/
my complete code with the 3 sliders instead of the 3 little boxes:
from sage.plot.plot3d.plot3d import axes
aL=[2,1,3] # coordinates list of the vector a on which b will be projeted
bL=[3,7,5] # coordinates list vector b (vector example to be projeted)
lL=5/2 # factor expansion to display red line in vector a direction
# here I adopt the convention a vector is a column matrix
A=matrix(QQ,aL).transpose() # matrix(2x1)
print( "P is the B projected vector on vector A ")
print("below all Capital letters are matrices(vectors are matrices),tiny letters are scalars ")
print("E=B-P with P=k*A " ,"E=B-k*A as E perpendicular to A => dot product(A,E)) = 0 means A.transpose()*E=0 " )
print("then A^T*(B-k*A)=0 so k*A^T*A)=A^T*B and k*(A^T*A)^-1 *A^T*A=(A^T*A)^-1 * A^T*B " )
print("so k=(A^T*A)^-1 * A^T*B")
@interact
def _(xb=slider([1..10],default=3),yb=slider([1..10],default=4),zb=slider([1..10],default=7)):
#show(xb,yb,zb)
bL=[xb,yb,zb]
B=matrix(QQ,bL).transpose() # matrix(3x1)
# Projection Matrix , called Pr
#The general formula for the orthogonal projection onto the column space of a matrix A is
# P = A (A^T A)^(−1) A^T
Pr_num=A * (A.transpose()) # matrix 3x3
Pr_den=(( (A.transpose()) * A ).det()) # scalar
#Pr_den=1 # scalar
#Pr=Pr_num/Pr_den # matrix(3x3)
# other compact form
Pr=A*((A.transpose()*A).inverse() * A.transpose())
g1=line([[-lL*e for e in A.list()],[lL*e for e in A.list()]], legend_label=' a projection line', legend_color='red',color='red')
g2=plot(vector(B),color="green",width=20,legend_label=' vector b', legend_color='green')
g3=plot(vector(A),color="black",width=3,legend_label=' vector A', legend_color='black')
aT = text3d("a",vector(A)*1.1,color='black',fontsize=20)
bT = text3d("b",vector(B),color='green',fontsize=20)
# projected vector P
P=Pr*B # matrix 3x1
k0=((A.transpose()*A).inverse() * A.transpose()*B).det()
k1=sqrt(((P.transpose()*P).det()/(A.transpose()*A).det()))
g4=plot(vector(P),color='blue',width=20,legend_label=' projected vector P', legend_color='blue',fontsize=20)
pT = text3d("p",vector(P)*1.1,color='blue',fontsize=40)
E=B-P # matrix 3x1
g5=plot(arrow(P.coefficients(),B.coefficients(),color='pink',width=5,legend_label=' vector e', legend_color='pink'))
eT = text3d("e",vector(E)/2+vector(P)*1.05,color='pink',fontsize=20)
# unit vectors
gx=plot(vector([1,0,0]),color='black',width=5,legend_label='x', legend_color='black')
xT = text3d("x",vector([1,0.1,0.1])*1.1,color='black',fontsize=20)
gy=plot(vector([0,1,0]),color='black',width=5,legend_label='x', legend_color='black')
yT = text3d("y",vector([0.1,1,0.1])*1.1,color='black',fontsize=20)
gz=plot(vector([0,0,1]),color='black',width=5,legend_label='x', legend_color='black')
zT = text3d("z",vector([0.1,0.1,1])*1.1,color='black',fontsize=20)
show(g1+g2+g3+g4+g5+aT+bT+pT+eT+gx+xT+gy+yT+gz+zT+axes(7, color='black') \
,figsize=(6, 6),xmin=-vector(B)[0],xmax=vector(B)[0]+3,ymax=vector(A)[1]+1,ymin=-1,zmax=vector(A)[2]+1,zmin=-1)
show(" A : ",A, " B : ",B, " Pr_num : ",Pr_num, " Pr_den : ",Pr_den, " Pr : ",Pr)
show(" A : ",A, " B : ",B, " projected vector P : ",P )
print "verify that k=(A^T*A)^(-1) * A^T*B = ||P|| / ||A||"
print " so P=A*k= A*(A^T*A)^-1 * A^T*B "
show ("P also equals to : A*(A^T*A)^(-1) * A^T*B : ",A*((A.transpose()*A).inverse() * A.transpose())*B )
show( "P= Projection Matrix * B= Pr*B so PR=A*((A.transpose()*A).inverse() * A.transpose() :",A*((A.transpose()*A).inverse() * A.transpose()))
show ( " sqrt(((P.transpose()*P).det()/(A.transpose()*A).det())) = ||P|| / ||A|| : ",k1)ortolljSat, 20 Jul 2019 08:40:29 +0200https://ask.sagemath.org/question/47221/Latex text in notebook and return lineshttps://ask.sagemath.org/question/47202/latex-text-in-notebook-and-return-lines/Hi
is there a way to display a text in notebook with return lines out of this heavy way ?:
show(LatexExpr(r" \
\text{ Late at night, guards on the battlements of Denmark's Elsinore castle}\\ \
\text{are met by Horatio, Prince Hamlet's friend from school.}\\ \
\text{The guards describe a ghost they have seen that resembles Hamlet's father,}\\ \
\text{the recently-deceased king. At that moment, the Ghost reappears,}\\ \
\text{and the guards and Horatio decide to tell Hamlet.}\
"))
ortolljThu, 18 Jul 2019 10:35:03 +0200https://ask.sagemath.org/question/47202/jupyter notebook multi users ?https://ask.sagemath.org/question/43919/jupyter-notebook-multi-users/Hello,
I used to use notebook sagenb for teaching purposes.
Each student had a login and password to work on the same server.
I ran into several internal server errors 500 using it. so I though since it seems that jupyter notebook is more recommended I should try and switch to it.
However, I am concerned because I am not sure it allows the same type of multi-users server.
Hint from jupyter notebook login page that points to
https://jupyter-notebook.readthedocs.io/en/stable/public_server.html
tell me that it might not.
So the questions are:
1/ with "sage -n jupyter --ip='*'" is it possible to have 16 or so students connecting to the same server and working on similar worksheets (as it seemed to work rather smoothly for sagenb)?
2/ if not, is there another way to have sage use jupyter notebook for multi users?
3/ if not, is an install of jupyterhub or sagemathcloud reasonnable with no particular sysadmin skill?
4/ if not is there anything else I should try?
5/ if not, do some of you have experience of sagenb under sage 8.3 usability?
Installing sagemath on all computers is not an option for me at the moment.
Best regards,
b
PS : my sagemath on a debian 9 server compiled from source (I used to use debian packages but though it might work more smoothly with install from source)bb16Thu, 11 Oct 2018 16:30:33 +0200https://ask.sagemath.org/question/43919/How can I retrieve sage worksheets from old hard drivehttps://ask.sagemath.org/question/45942/how-can-i-retrieve-sage-worksheets-from-old-hard-drive/Recently, my computer (a Macbook Pro) stopped working suddenly. I have now replaced it with a newer Macbook Pro, and I would like to get my sage worksheets from my previous computer onto my new one. The drive on the old computer is fine and I have access to everything on it, but I do not know where the sage worksheets are stored. According to this: https://ask.sagemath.org/question/8658/where-in-the-file-system-is-sage-notebook-storing-the-worksheets/ they should be in the directory ~/.sage/sage_notebook.sagenb/home/. I have copied the .sage directory from my old hard drive to my new one. Inside there is indeed a directory called sage_notebook.sagenb and inside that there is a directory called home. Inside home is a folder named \__store__, and then three shortcuts (I think they are shortcuts, they are little folders with arrows in the bottom left corner) named admin, guest, and pub. Both guest and pub are empty. The contents of \__store__ are mostly inscrutable. There are essentially three possible paths one can take:
/\__store__/0/08/084/084e/guest/ which is empty
/\__store__/3/3a/3a2/3a21/pub/ which is empty
/\__store__/2/21/212/2123/admin/ which is filled with folders 0 through 34 and a file called history.pickle
Inside each of the folders labeled 0 through 34 are two folders named cells and data and two files named worksheet_conf.pickle and worksheet.html. The data and cells folders are sometimes empty but other times data contains some of my .sobj files and cells contains one or many folders labelled by seemingly random numbers. Inside these folders are files of various types, I think I have seen .sobj, .png, and .txt files so far.
What do I do so that when I run notebook() in a sage terminal and it opens up a browser window with all of my worksheets listed I will be able to see the worksheets that I had on my previous computer?David E. RobersonFri, 29 Mar 2019 16:59:35 +0100https://ask.sagemath.org/question/45942/Pretty print output in Jupyter notebookhttps://ask.sagemath.org/question/45481/pretty-print-output-in-jupyter-notebook/ <p>In order to provide meaningful results to my students in a Jupyter notebook, I would like to pretty print some output, including text, LaTeX and things computed by Sage. I have found that I could combine either <code>show</code> (or <code>pretty_print</code>) and <code>html</code>, or <code>show</code> and <code>LatexExpr</code>. For example,
either</p>
<pre><code>limit = r"\displaystyle\lim_{x\to0}\frac{\sin x}{x}="
value = lim(sin(x)/x, x=0)
show(html("Solucion: "+"${}={}$".format(limit,value)))
</code></pre>
<p>or, instead,</p>
<pre><code>limit = r"\displaystyle\lim_{x\to0}\frac{\sin x}{x}="
value = lim(sin(x)/x, x=0)
show("Solucion: ", LatexExpr(limit), value)
</code></pre>
<p>I would ask the following questions:</p>
<ol>
<li>Is there any reason to prefer one approach to the other?</li>
<li>If I replace <code>"Solucion"</code> by <code>"Solución"</code> (please note the accented <code>ó</code>), which is the correct way to write this Spanish word, in both approaches I get meaningless letters instead of the expected output. If I use <code>u"Solución"</code>, then Sage raises the error <code>'ascii' codec can't encode character u'\xf3' in position 6: ordinal not in range(128)</code>. Is there a way to use non-English characters?</li>
</ol>
I am using SageMath 8.5 on a MacBook Pro with macOS High Sierra. JuanjoSun, 17 Feb 2019 17:00:45 +0100https://ask.sagemath.org/question/45481/Sage Notebook IOPub data rate exceeded error?https://ask.sagemath.org/question/44948/sage-notebook-iopub-data-rate-exceeded-error/Hi,
Currently I'm running a very system intensive process on Sage and I'm getting this error.
IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_data_rate_limit`.
Current values:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)
From research, I am supposed to paste the below in my command prompt.
jupyter notebook --generate-config
But when I try to do so, it says that it is not recognised as an internal or external command.
How do I resolve this issue?Stockfish3709Tue, 08 Jan 2019 07:05:21 +0100https://ask.sagemath.org/question/44948/How can I access the notebook interface using Tails OS ?https://ask.sagemath.org/question/44341/how-can-i-access-the-notebook-interface-using-tails-os/Background: SageMath responds to the notebook() command by automatically opening the default browser. The default browser on Tails OS is the Tor Browser which cannot access localhost.
Question: Is there a way to prevent SageMath from automatically opening a browser which would permit the notebook to be accessed using Tails' Unsafe Browser ? If not, is there some other workaround?ScLaMon, 19 Nov 2018 20:06:00 +0100https://ask.sagemath.org/question/44341/Plotting > 10k random 3D pointshttps://ask.sagemath.org/question/44286/plotting-10k-random-3d-points/Hi,
First of all, I am new to SAGE, and only started using it today.
I want to plot 100 000 random 3D points in SAGE, and it takes a LOT of time just to plot 10 000 points.
This is the code I have:
def random_point(): return (random(), random(), random())
l = [random_point() for k in [1 .. 10000]]
s = point3d(l, size=5)
show(s, aspect_ratio=1)
I noticed that the last two lines take incredibly long each.
Then, after the `show`, when I try to interact with the graphic, it is blank. I can even show the boundbox and axes, but the plot is nowhere to be seen.
If I change to `[1 .. 100]`, everything works as intended, but this amount of points is not enough.
What should I do to accomplish effectively my goal?
I am using SAGE 8.1, installed on macOS via brew, after running `notebook()` on the command line and using the browser-based notebook.
Thank you!KayvlimThu, 15 Nov 2018 02:34:52 +0100https://ask.sagemath.org/question/44286/Load module from remote serverhttps://ask.sagemath.org/question/43778/load-module-from-remote-server/Hi, I am using a remote sage notebook public server (such as http://sage.math.canterbury.ac.nz/).
I would like to be able to load my own python modules, but I don't know how can I access local files, such as
import sys
sys.path.append('path-to-file-in-my-local-drive')
import module-name
Is there any way to do that?jllbThu, 27 Sep 2018 10:38:06 +0200https://ask.sagemath.org/question/43778/Only one of two identical entries in the notebook gives graphics output for show()https://ask.sagemath.org/question/43638/only-one-of-two-identical-entries-in-the-notebook-gives-graphics-output-for-show/I use SageMath to teach a bunch of kids. I have to confess a certain amount of frustration with the SageMath notebook. In particular, tonight I composed a notebook entry which shows some data points and curve-fitted plots. I pressed Shift-Enter to evaluate, and there was no graphical output (nor any error message).
And then I copied/pasted the exact same entry into a blank entry in the same SageMath notebook, pressed Shift-Enter, and it showed the graphical output.
Yes, this is the SAME notebook page which, if you scroll up, shows no graphical output (I inserted a print("Ok.") just to confirm that there was SOME output), and if you scroll down, you see the IDENTICAL python-like SageMath script, and then it shows the graphics of the plotted points as desired.
How could this happen? Is there something that happens in between notebook entries? Perhaps only the last entry is evaluated? I will try posting screenshots.
ok, the screen shots are as follows:
<a href="https://pasteboard.co/HDowwUc.png">no plot, just text</a>
<a href="https://pasteboard.co/HDoxbZ1.png">plot after the text</a>
in the first entry, you can see the notebook entry, and then underneath in blue the SageMath output "Ok.", and that's all; the next notebook entry follows immediately. There is no plot.
in the second entry, you can see the notebook entry, and then underneath in blue the SageMath output "Ok.", and under that is the plot of the two data points and the axes.
For what it's worth, the SageMath notebook entry is as follows. The variable "stage" is so that I can easily turn on/off various parts of the entry by modifying it as I get to various parts of the lesson. (But there is no difference between the entry that works and the entry that doesn't.)
"all_go" is the accumulation of all the graphics objects that I want to display, that is, the output of the points() function in this case, and depending on the setting of my "stage" variable, possibly also a plot of f(x).
I am using SageMath 7.5.1 on Kubuntu 14.04. I know it's not the newest version, but I mst be missing something.
Any help would be appreciated
<pre>
---( start )---
stage="p2m1"
# stage can be p2 or p3 = data points
# stage can be d0 or d1 = display
# stage can be m1 or m2 or me = model
var('a,b,c')
if stage.find("p2") >= 0 :
mydata = [[1,2],[3,5]]
else :
mydata = [[1,2],[2,4],[3,5]]
#mydata
mydata_plot = points(mydata,color='purple', size=100)
if stage.find("m1") >= 0 :
mymodel(x) = b*x + c
elif stage.find("m2") >= 0 :
mymodel(x) = a*x^2 + b*x + c
elif stage.find("me") >= 0 :
mymodel(x) = a*exp(b*x) + c
myfit = find_fit(mydata,mymodel,solution_dict=True)
if stage.find("m1") >= 0 :
f(x) = mymodel(b=myfit[b], c=myfit[c])
else :
f(x) = mymodel(a=myfit[a], b=myfit[b], c=myfit[c])
#f(x) = 6 - 2^(3-x)
#f(x) = (-8) * exp( x*(-ln(2))) + 6
mymodel_plot = plot( f, (x,0,4,), color='red')
all_go = mydata_plot
if stage.find("d1") >= 0 :
all_go += mymodel_plot
t_min=0
t_max=5
t_default=1.5
sample_t=t_default
global_go = all_go
all_go
if stage.find("d1") < 0 :
all_go.show()
print("Ok.")
elif stage.find("d1") >= 0 :
@interact
def _(sample_t=slider(t_min, t_max, default=t_default, step_size=0.1)):
global global_go
all_go = global_go
#sample_t=2
output_y = f(sample_t)
point_tuple = ( sample_t, output_y )
plotpoint_go = point2d( point_tuple , size=200, color='green')
all_go += plotpoint_go
all_go.show()
f.show()
print( "f(" + str(sample_t) + ") = " + str(output_y) )
---( end )---
</pre>
quantumTue, 11 Sep 2018 15:14:09 +0200https://ask.sagemath.org/question/43638/How to show the output of print() in to jupyter notebook?https://ask.sagemath.org/question/43078/how-to-show-the-output-of-print-in-to-jupyter-notebook/ In Sagemath's Jupyter Notebook, The output of print () always is showed into terminal. So for this reason, I can not get output of the functions such as graph_classes.Tree.description(). But in the anacanda's jupyter notebook for python, we can show the output of print() in jupyter notebook. How to solve the problem? Thanks.dannyThu, 19 Jul 2018 14:50:09 +0200https://ask.sagemath.org/question/43078/Unable to download to PDFhttps://ask.sagemath.org/question/43049/unable-to-download-to-pdf/I'm using SageMath 8.2 on a Windows 10 Native with Jupyter Notebook.
When trying to download to PDF a Jupyter Notebook, I get the following message:
500 : Internal Server Error
nbconvert failed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99998 (MiKTeX 2.9.6500 64-bit)
entering extended mode
! I can't find file `/home/danie_000/SageManifolds/test/notebook.tex'.
<*> ...e/danie_000/SageManifolds/test/notebook.tex
Please type another input file name:
! Emergency stop.
<*> ...e/danie_000/SageManifolds/test/notebook.tex
No pages of output.
Transcript written on texput.log.
It is looking for some file in `/home/danie_000` but I don't use that default directory to place my Jupyter files.
I've changed my fstab like this:
D:\Users\danie_000\Sage /home/danie_000 ntfs binary,posix=1,acl 0 0
So I use `D:\Users\danie_000\Sage` instead, a different directory and drive. If SageMath allows changing the default root directory via changing the fstab file, it should also change any command that needs that information!
Daniel
danielvolinskiTue, 17 Jul 2018 18:45:03 +0200https://ask.sagemath.org/question/43049/best way to convert many notebooks from sagenb to jupyter?https://ask.sagemath.org/question/41680/best-way-to-convert-many-notebooks-from-sagenb-to-jupyter/I moved from sagenb to jupyter a while ago, but I still have a large number of sagenb notebooks that I have been converting one-by-one on demand. Is there a way to convert all of them at once and save them to a dedicated folder? Currently, when I start sage -notebook, I get to an interface where I can see all my sagenb notebooks and I have the option to click on any of them, convert and open in jupyter. I would actually like to convert all of them without opening them.
This is related to https://ask.sagemath.org/question/35873/how-to-automatically-convert-many-sws-to-ipynb/, but I suppose that there is a better way now. Thanks already for your help!stanWed, 21 Mar 2018 14:36:13 +0100https://ask.sagemath.org/question/41680/Notebook problemshttps://ask.sagemath.org/question/40937/notebook-problems/I am asking this for the third time with more details, since there are no answers yet. Since my notebook isn't working, I am using the Cloud, but I'd like to get the notebook running again.
So, I have sagemath notebook installed on my Mac laptop, and it has been working fine until recently, maybe because I tried to run some 3d graphics program I found on the Sagemath manual. Then it froze up.
I can see all my files, but I cannot run any programs. There is no "evaluate" button. The box for a new program doesn't turn blue around the edge. If I open up a worksheet, and go back to the list of files, it says (running), though nothing is working. Also, the "Help" and "Report a Problem" and "log" buttons don't work. "Home" and "Sign Out" do.
I can sign out, log back in and it's still stuck. Restarting the Mac also doesn't help. Do I have to create a new notebook?
Reinstall everything?
Help please !!!
thanks very muchalFri, 02 Feb 2018 21:13:09 +0100https://ask.sagemath.org/question/40937/notebook admin not workinghttps://ask.sagemath.org/question/40861/notebook-admin-not-working/Hello,
I have installed sagemath on debian (Stretch) with the debian package on 3 different computers.
When clicking on manage users 500: internal server error
and
raise BuildError(endpoint, values, method, self)
BuildError: Could not build url for endpoint 'users' with values ['reset']. Did you mean 'admin.users' instead?
I have no clue how to fix this or what it is due to...
maybe I need to configure notebook or use different options
Any idea ?
Thank-you,
b.
edited added debian release 9bb16Mon, 29 Jan 2018 18:37:30 +0100https://ask.sagemath.org/question/40861/Get TypeError: 'tuple' object is not callablehttps://ask.sagemath.org/question/39844/get-typeerror-tuple-object-is-not-callable/Just downloaded sage-8.0-Debian_GNU_Linux_8-x86_64.tar.bz2.
Seems to be working well.
Great work as always!
Trying to solve simultaneous equations.
Get error "TypeError: 'tuple' object is not callable."
Found exactly the examples I needed in Basic Algebra and Calculus. Solving Equations (online Sage reference).
Copied and pasted Jason Grout's example and also the examples above it.
Get error message "TypeError: 'tuple' object is not callable." in notebook() , but examples work in terminal.
Here is one of the examples that gives the error in notebook() (but works in terminal).
sage: x, b, c = var('x b c')
sage: solve([x^2 + b*x + c == 0],x)
What am I missing here?
Any ideas?
Thanks.
bbtpThu, 30 Nov 2017 11:26:36 +0100https://ask.sagemath.org/question/39844/What to do to save a plot from notebook?https://ask.sagemath.org/question/39624/what-to-do-to-save-a-plot-from-notebook/Is it possible to export a plot, preferable in a vector format from a notebook?boosterFri, 17 Nov 2017 09:24:37 +0100https://ask.sagemath.org/question/39624/where do I get the notebook user name and passwordhttps://ask.sagemath.org/question/39150/where-do-i-get-the-notebook-user-name-and-password/ I installed windows ubuntu, then sage, started notebook() and the notebook wants username and password. Where in the heck is that?cybervigilanteFri, 13 Oct 2017 03:30:24 +0200https://ask.sagemath.org/question/39150/Installing SageMath for multiple users?https://ask.sagemath.org/question/37505/installing-sagemath-for-multiple-users/ I have been asked to look into installing SageMath on a server for use by multiple users (I am a sysadmin and not a mathematician). I had initially looked into this a couple of years ago, but then priorities were changed.
From the previous occasion, I recall that SageMath installation is generally from a tarball (or a possibly quite fearsome compilation from source), and that the SageMath notebook interface runs in the user's web browser. I seem to recall then that it would be difficult or impossible for more than one end user to run SageMath, as, when it opens a web browser, it is not aware of there actually being different end users on a multi-user server computer and the notebook interface would not be able to cope with this (without somehow running multiple web interfaces on separate network ports?). The SageMath documentation also rather seems to assume the use case of an individual user with sysadmin powers installing SageMath on their own personal computer for their own stand-alone personal use (if there is specific documentation about setup for multiple users, I have not yet found it, unfortunately).
Is it (easily) possible to install SageMath on a (Linux) server for multiple end users to be able to use it via the notebook interface, or would it realistically be substantially easier to consider the use of the SageMath Cloud service instead?
Thank you for any advice.dave559Thu, 04 May 2017 12:42:58 +0200https://ask.sagemath.org/question/37505/UnicodeDecodeError in matplotlib if 'python' set instead of 'sage' in Notebookhttps://ask.sagemath.org/question/37364/unicodedecodeerror-in-matplotlib-if-python-set-instead-of-sage-in-notebook/Hello!
I am trying to make publication ready images for LaTeX in Sage with matplotlib (due to the complex nature of the plot) in Notebook.
I have a lot of numerical calculations (not symbolic) so I switch to 'python-mode' using drop-down list on top of the Worksheet (so it looks like 'File...', 'Action...', 'Data...', 'python') so that my constants would read as native python's data types not Sage's symbolic objects.
Now having the switch on top of the page in 'python' mode the following code:
from matplotlib import rc
rc('text', usetex=True)
rc('text.latex', unicode=True)
rc('text.latex', preamble='\usepackage[utf8]{inputenc}')
rc('text.latex', preamble='\usepackage[russian]{babel}')
font = {'family': 'serif',
'serif': ['Computer Modern Unicode']}
rc('font', **font)
import matplotlib.pyplot as plt
plt.plot([1], [1])
plt.title(ur'Тест')
plt.savefig("test.png")
yields ether UnicodeDecodeError or the image with the text corrupted:
![example of the corrupted output](/upfiles/14928022812226123.png)
But if I switch to 'sage' on top of the page, it works as expected:
![example of the valid output](/upfiles/14928023491980951.png)
I have no idea how that switch on top of the page affects matplotlib's output, but would really like to be able to use Cyrillic (utf8) letters and 'python' mode **at the same time**.
P.S. That magical switch on top of the page is really painful since I also can not save Worksheets if they contain utf-8 characters: [as in this still unresolved issue](https://ask.sagemath.org/question/26167/unicodedecodeerror-in-notebook-server-if-worksheet-is-set-to-python-instead-of-sage/) :-( :-(
**UPDATE:** Tested the MWE above in Jupiter - seems to work properly! And due to inevitable migration to Jupiter, the problem seems not to be obsolete.EugeneFri, 21 Apr 2017 21:24:54 +0200https://ask.sagemath.org/question/37364/