ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 09 Nov 2020 22:19:08 -0600How get openssl with python 3 for macOS Sage 9.2?https://ask.sagemath.org/question/54185/how-get-openssl-with-python-3-for-macos-sage-92/I just installed the app version of Sage 9.2 under macOS Catalina (10.15.7), to replace Sage 9.1 which had been working perfectly.
Starting Sage 9.2 opens file:///Applications/SageMath-9.2.app/Contents/Resources/loading-page.html in Safari, but then it hangs. Viewing the log shows:
<code>
Traceback (most recent call last):
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/repl/ipython_kernel/install.py", line 307, in have_prerequisites
from notebook.notebookapp import NotebookApp
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 66, in <module>
from tornado import httpserver
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/tornado/httpserver.py", line 29, in <module>
import ssl
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.2, Release Date: 2020-10-24 │
│ Using Python 3.8.5. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...
The Jupyter notebook requires ssl, even if you do not use
https. Install the openssl development packages in your system and
then rebuild Python (sage -f python3).
</code>
What exactly do I do about openssl? I already have the MacPorts openssl @1.1.1h_0. My default python3 is from the Anaconda distribution, and I used the conda command to install openssl, and the Anaconda environment includes both openssl 1.1.1h and pyopenssl 19.1.0.
**QUESTION:** What more do I need to do, and how?
Is there some way that I need to install openssl into the sage environment, too, and if so, how?
Even if I take care of that, then how would I use the "sage -f python3 command": if I try to execute, e.g., "/Applications/SageMath-9.2.app/Contents/MacOS/sage --help", that tries again to start the server, but the openssl problem prevents it from opening -- which means that once I did (somehow) get the openssl requirement satisfied, I don't know how to get the command "sage -f python3" to work. Seems like a "Catch 22"!
I never had any openssl problem with Sage 9.1 (or earlier versions, either).murrayeMon, 09 Nov 2020 22:19:08 -0600https://ask.sagemath.org/question/54185/To call sagemath program (jupyter notebook) from c programhttps://ask.sagemath.org/question/54161/to-call-sagemath-program-jupyter-notebook-from-c-program/Hi, Actually I am implementing an attack on cipher. For that I need some SAT computation. Since SAT computation can be done easily in SAGEMATH. So my program looks something like:
----------
1. I write some code in C
2. Then I will pass some input to SAT i.e. to SAGEMATH (jupyter notebook)
3. Take the output in C , verify
4. Again run 1,2,3 for finite number of times.
----------
I check SAGE documentation for a piece of Cython code but that worked for small example but the program gets complicated it returns some error.
Can you guide me in this way or provide me some references? Which is faster calling sage from c OR calling c from sage jupyter notebook?
Thanks for your help.SatyamSun, 08 Nov 2020 06:57:25 -0600https://ask.sagemath.org/question/54161/show command latexhttps://ask.sagemath.org/question/54132/show-command-latex/I use sage both within the cocalc interface and the jupyter interface. The show() command behaves differently in each and I'm trying to understand. Here's an example in cocalc:
https://drive.google.com/file/d/1ZVMg5d3DMKGsXLfWcrZmBZm19yTH8G2L/view?usp=sharing
The same example in jupyter:
https://drive.google.com/file/d/1ZXaNv44HEpzSoyG6pz6I_PVKkwEd1_YH/view?usp=sharing
The in-line latex in cocalc is rendered nicely, the same latex in jupyter isn't. I've included the %display latex directive in the jupyter example, but it doesn't seem to make a difference.UncountableSetFri, 06 Nov 2020 11:05:38 -0600https://ask.sagemath.org/question/54132/install sagemath into jupyter in windows 10 rather than the reversehttps://ask.sagemath.org/question/54022/install-sagemath-into-jupyter-in-windows-10-rather-than-the-reverse/ Okay, this is backwards from the usual. Sagemath failed for some odd reason and a reinstall didn't work. In the meantime, though, I've installed Anaconda, which has the Juptyer notebook, which accepts the Sagemath kernel. Is it possible to install the kernel into Jupyter, rather than the usual, in which sagemath installs jupyter? A kernel is a kernel so it seems possible but I've looked around and can't find a way. It only seems to work in Linux and I'm using Windows. cybervigilanteSun, 25 Oct 2020 00:08:59 -0500https://ask.sagemath.org/question/54022/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 14:14:22 -0500https://ask.sagemath.org/question/53463/Latex (?)--Riemann tensor overflowhttps://ask.sagemath.org/question/53283/latex-riemann-tensor-overflow/While running Kerr_Schild.ipynb
- https://github.com/egourgoulhon/BHLectures/blob/master/sage/Kerr_Schild.ipynb
I get a bad output; not necessarily incorrect. I copied the TeX to a LaTeX GUI editor and it looks right.
When the last expression is evaluated it outputs TeX instead of LaTeX image. It is very long so it might just be a converter problem; that I can ignore. After the leadin the expression:
g.riemann().display()
Well I can't attach a trimmed file but I can provide a Dropbox link if needed.
The above expression was added just after the "Kerr Metric" paragraph; about line 13.
Is this my machine or LaTeX or Jupyter ?rrogersThu, 03 Sep 2020 16:45:04 -0500https://ask.sagemath.org/question/53283/Interact in Jupyterlab vs Jupyterhttps://ask.sagemath.org/question/50194/interact-in-jupyterlab-vs-jupyter/Hello, Sage community!
I find Jupyterlab to be more comfortable than Jupyter, so I installed it with
sage -pip install jupyterlab
and I execute it with
sage -n jupyterlab
Everything work well, except when I try to execute an interact, in which case, no sliders, no selection boxes, etc. appear. However, if I use Jupyter with
sage -n jupyter
the interact works well.
Here is a minimal working example:
@interact
def const(k = slider(-5,5,0.1,1,label='Constant')):
print(k)
In this particular case, I obtain in Jupyterlab just `1.00000000000000` without any controls, nor the possibility to change the value of `k`.
Can somebody explain why it is not possible to use interacts in Jupyterlab while it is possible in Jupyter?dsejasMon, 09 Mar 2020 00:09:38 -0500https://ask.sagemath.org/question/50194/nbextensions in jupyter from sagemathhttps://ask.sagemath.org/question/52272/nbextensions-in-jupyter-from-sagemath/Hello to everyone,
I am trying to install `nbextensions` for jupyter. I always run jupyter from sage with `sage -n jupyter`. I just upgraded (builr) to sage 9.1, then did `sage -pip install jupyter_contrib_nbextensions`. I got no error for that installation, but then when I launched `sage -n jupyter` I was expecting to see that extra tab for the extensions. It is not there, though.
Running on a unbutu18.04 machine.
Thanks!
JC
JCTue, 30 Jun 2020 14:16:42 -0500https://ask.sagemath.org/question/52272/How allow renaming SageMath-x.y.app to SageMath.app for sagetexhttps://ask.sagemath.org/question/51969/how-allow-renaming-sagemath-xyapp-to-sagemathapp-for-sagetex/When using the `sagetex` with LaTeX under MacTeX and the TeXShop front end, the suggested method (from the TeXShop docs) is to rename `SageMath-x.y.app` to just `SageMath.app` and then to create symlinks for the executable `sage` and for `sagetex.sty` within the Contents of the app.
That works just fine to use `sagetex` in LaTeX.
However, once the renaming is done, the app itself no longer works! Once I open the renamed SageMath.app, I get a pop-up error message "Juypyter Server failed to start...", and inspecting the log reveals:
/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: No such file or directory
/Applications/SageMath.app/Contents/Resources/sage/src/bin/sage: line 617: exec: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/python3: cannot execute: No such file or directory
Apparently access to `python3` has been hard-coded into the `sage` executable so that it is expect to be in the file tree with root the original name `SageMath-x.y`.
Is there some workaround so that one can both use `sagetex` in the way recommended by the MacTeX/TeXShop world and still be able to use the SageMath app normally to start the Jupyter server, etc.?murrayeSun, 14 Jun 2020 09:51:53 -0500https://ask.sagemath.org/question/51969/Jupyter, Mathjax colorhttps://ask.sagemath.org/question/51903/jupyter-mathjax-color/ The following page `http://adereth.github.io/blog/2013/11/29/colorful-equations/` gives advice to add color in mathjax. But this seems not to work with Sage under Jupyter. Has some body a solution ?CyrilleThu, 11 Jun 2020 03:55:43 -0500https://ask.sagemath.org/question/51903/From Jupyter to one cell serverhttps://ask.sagemath.org/question/51705/from-jupyter-to-one-cell-server/ Hi there,
A long time ago I learned how to use the one-cell server. At that moment I was creating simple .html files for my students, so they could execute some code and learn a bit of Sage.
Nowadays this seems inefficient, instead of writing .html file it seems reasonable to write everything in a jupyter notebook. As I want to embed the files into a Moodle page, and want the cells to be executable therein, or by downloading an html file, without having Sage installed in the local machine, I thought I could try to turn each code cell of the jupyter notebook into a cell pointing to the one-cell server. Is it possible to do this efficiently? Can I somehow achieve my goal with Cocalc?
Thanks!JCTue, 02 Jun 2020 09:49:21 -0500https://ask.sagemath.org/question/51705/jupyter dochttps://ask.sagemath.org/question/51645/jupyter-doc/this is a very stupid question :
is there a documentation for the use of Jupyter in sagemath distribution ? Shortcut... customization....CyrilleSat, 30 May 2020 11:36:37 -0500https://ask.sagemath.org/question/51645/Creating slave notebookshttps://ask.sagemath.org/question/51549/creating-slave-notebooks/ I wonder if it si possible to construct a command to open a novel notebook inheriting of the properties of the main notebook an to communicate (go to a certainline of one of the two notebooks and to come back.
In such a way we could have a main notebook and each section would be a novel notebookCyrilleMon, 25 May 2020 09:36:29 -0500https://ask.sagemath.org/question/51549/Problem with Jupyter displaying a picturehttps://ask.sagemath.org/question/51492/problem-with-jupyter-displaying-a-picture/ When things goes wrong usually Jupyter open a windows to print warning. Why some times when things are fine it does the same thing?CyrilleFri, 22 May 2020 04:27:15 -0500https://ask.sagemath.org/question/51492/Problem: Jupyter (Sage) with Numba and pypyhttps://ask.sagemath.org/question/51098/problem-jupyter-sage-with-numba-and-pypy/I install it by:
pip3 install numba
How to use and import numba, pypy in sage.
I get:
ModuleNotFoundError: No module named 'numba'
when I run the following code
(from https://numba.pydata.org/numba-doc/latest/user/5minguide.html )
from numba import jit
import numpy as np
import time
x = np.arange(100).reshape(10, 10)
@jit(nopython=True)
def go_fast(a): # Function is compiled and runs in machine code
trace = 0
for i in range(a.shape[0]):
trace += np.tanh(a[i, i])
return a + trace
start = time.time()
go_fast(x)
end = time.time()
print("Elapsed (with compilation) = %s" % (end - start))
start = time.time()
go_fast(x)
end = time.time()
print("Elapsed (after compilation) = %s" % (end - start))SYLATue, 28 Apr 2020 05:39:37 -0500https://ask.sagemath.org/question/51098/How to create url/file link in jupyter/sage?https://ask.sagemath.org/question/51144/how-to-create-urlfile-link-in-jupytersage/I have file/url:
load("/home/***/MJRun.sage")
I would like to open (fast) this file/url in Jupyter in another card of Firefox. For example by one click. I use this file very often. How to do that?SYLAWed, 29 Apr 2020 08:58:57 -0500https://ask.sagemath.org/question/51144/matplotlib Animation in Jupyter notebookhttps://ask.sagemath.org/question/50195/matplotlib-animation-in-jupyter-notebook/Hi
SageMath 9.0 , Ubuntu 18.04.4 LTS
[matplotlib Animation little example](https://learndataanalysis.org/a-basic-example-how-to-create-animation-matplotlib-tutorial/)
Why does this code work well in a Sage terminal window, but does not work in a Jupyter notebook window or on the SageCell server?
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
x_data = []
y_data = []
fig, ax = plt.subplots()
ax.set_xlim(0, 105)
ax.set_ylim(0, 12)
line, = ax.plot(0, 0)
def animation_frame(i):
x_data.append(i * 10)
y_data.append(i)
line.set_xdata(x_data)
line.set_ydata(y_data)
return line,
animation = FuncAnimation(fig, func=animation_frame, frames=np.arange(0, 10, 0.1), interval=10)
plt.show()ortolljMon, 09 Mar 2020 01:36:46 -0500https://ask.sagemath.org/question/50195/Can I make MathJax output centered in the notebook?https://ask.sagemath.org/question/50002/can-i-make-mathjax-output-centered-in-the-notebook/ My problem is the same one described here:
[Equations in notebook jump from centered to L aligned upon rendering](https://github.com/ipython/ipython/issues/7827)
and
[Centered equations become left aligned if displayed through the markdown display hook](https://github.com/ipython/ipython/issues/11159)
When I use @interact on something that outputs latex in the notebook, the constant jumping to the left is very annoying and distracting.
E.g.:
@interact
def myfunc(n = slider(1,10)):
P = matrix([[1,2,n], [2,2,3]])
show(P)
Is there any way I can control the MathJax rendering in the notebook? Can I perhaps set it to render in the center so I don't have to deal with the jumping?
ThankseodThu, 20 Feb 2020 06:40:07 -0600https://ask.sagemath.org/question/50002/same-origin errors for SageMath tutorial inside Jupyterlabhttps://ask.sagemath.org/question/49940/same-origin-errors-for-sagemath-tutorial-inside-jupyterlab/Summary: When I select Help for sagemath from the menu in Jupyterlab, the browser throws "`allow-same-origin`" errors in the console and eventually stops processing pages completely, showing "`math processing error`" for all formulas.
I am trying to add SageMath to our existing JupyterLab 1.2.6 installation inside a docker with an Ubuntu 18.04 image. I installed SageMath 9.0 and added SageMath to Jupyter via `jupyter kernelspec install ./local/share/jupyter/kernels/sagemath`.
Everything seems to run fine, except for the help: When I select "Sage Documentation" from the Help menu, in the Web Browser console I get `The document is sandboxed and lacks the allow-same-origin flag`. While the document seems to be working anyway, going through the doucmentation yields an error for every single formula it encounters, specifically: `Access to font at XX from origin null has been blocked by CORS policy, No Access-Control-Allow-Origin header is present on the requested resource`.
Still, it seems to be working somewhat, I think with the wrong fonts, but readable. However, at some point MathJax stops processing formulas completely and shows `Math Processing Error` for each formula.
I already tried setting allow-origin in the notebook configuration, but that did not change anything.
Anybody has a clue?wuebbelSun, 16 Feb 2020 02:53:03 -0600https://ask.sagemath.org/question/49940/How can you import C++ code into a Jupyter notebook?https://ask.sagemath.org/question/49922/how-can-you-import-c-code-into-a-jupyter-notebook/ I have a c++ function that I would like to use with Jupyter. I'd like to be able to call it from the main python thread. A minimal example would be something like the following:
#begin c code definition
#include <vector>
#include <iostream>
void printout(std::vector<int> input){
std::vector<int>::iterator start;
std::vector<int>::iterator end;
end=input.end();
for (start=input.begin();start!=end;++start){
std::cout<< *start;
}
std::cout<< std::endl;
}
int main(){
std::vector<int> sample{1,2,3};
printout(sample);
return 0;
}
#switch back to python
printout((1,2,3))
I don't particularly need to call the function or run the main thread in C++, the main() is included to show how this function would be used in the C++ context. Broadly, I want something like the reverse of CythonizejdoolittFri, 14 Feb 2020 09:58:02 -0600https://ask.sagemath.org/question/49922/SageMath 9.0 app macOS: jupyter server fails to starthttps://ask.sagemath.org/question/49381/sagemath-90-app-macos-jupyter-server-fails-to-start/When I open SageMath-9.0.app under macOS Catallina (10.15.2), I get an immediate pop-up error window saying, "Jupyter Server failed to start".
The log shows:
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01 │
│ Using Python 3.7.3. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...
However, I can get the Jupyter server to start with an indirect method that was never required in earlier versions of SageMath-x.x.app, namely:
In Finder, Show package contents for SageMath-9.0.app.
Navigate in Finder to Contents/MacOS.
Double-click Sage.
That both starts the server and opens the expected client window in Safari, from which I can open and evaluate cells in an existing notebook or create a new SageMath 9.0 notebook.
So something that used to be "hooked up" between the SageMath-x.x.app and the command to start the jupyter server has been broken with 9.0.murrayeSun, 05 Jan 2020 13:35:42 -0600https://ask.sagemath.org/question/49381/Check if code is running in SageMath Cell or Jupyter notebookhttps://ask.sagemath.org/question/48881/check-if-code-is-running-in-sagemath-cell-or-jupyter-notebook/ I am preparing interacts to be run either in a Jupyter notebook or in SageMath Cell. I would like to write code valid for both environments, taking into account the differences between them. For example, I have not seen a common way to change the default text in auto update buttons. The following code would work in both environments if I would know how to automatically set up the `running_in_Jupyter` boolean:
if running_in_Jupyter:
auto = False
else:
auto = UpdateButton(text="Press to update")
@interact
def test(n=slider(0,20,1), auto_update=auto):
print n
if running_in_Jupyter:
test.widget.children[-2].description="Press to update"
So, is there a simple test I could implement to detect where the code is running?
JuanjoMon, 25 Nov 2019 06:48:00 -0600https://ask.sagemath.org/question/48881/How to obtain high quality plots in the Jupyter notebook?https://ask.sagemath.org/question/48580/how-to-obtain-high-quality-plots-in-the-jupyter-notebook/ When plotting figures in the Jupyter notebook, the result is always a grained and low resolution image. With Python's `matplotlib`, this issue can be mitigated using the following command:
%config InlineBackend.figure_format = 'svg'
which makes `matplotlib.pylplot.plot` produce very high resolution figures in the notebook.
Is there a way to obtain the same result with SageMath's `plot` command?TofiFri, 01 Nov 2019 03:00:21 -0500https://ask.sagemath.org/question/48580/Access to files produced by view() in Jupyterhttps://ask.sagemath.org/question/47963/access-to-files-produced-by-view-in-jupyter/ How would one access files produced by the view() function, when running Sagemath in Jupyter[hub] notebooks? The files are ~/.sage/temp/<hostname>/<pid>/sage_viewerXYZ/sage.{tex,pdf}. External viewer can't be invoked when using notebook server (Jupyterhub) and I would like to do something like show(html("<a href='location/sage.pdf'>PDF</a>)).Šarūnas BurdulisWed, 18 Sep 2019 11:39:07 -0500https://ask.sagemath.org/question/47963/RISE in Jupyterhttps://ask.sagemath.org/question/47513/rise-in-jupyter/ Hello to eveyone,
I wnated to install and use RISE to make Jupyter presentations from Sagemath, but something went wrong. I did it once, and it works with one laptop, but when trying to do the same with anoter (freshly installed Ubuntu 18.04), I ran in trouble.
I compiled sage-8.8 from the source.
I got the instructions to install RISE from [here](http://www.slabbe.org/blogue/categorie/sage/),(changing to lower case does not affect the result) and also [here](https://opendreamkit.org/2018/07/23/live-online-slides-with-sagemath-jupyter-rise-binder/).
- When i ltry to execute `~.../sage-8.8$ ./sage -pip install RISE` I get an error that begins with :
`pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available....`
- On the other hand I followed [these instructions](https://hackprogramming.com/2-ways-to-permanently-set-path-variable-in-ubuntu/) (option 2) to add `sage` as a command. Then when I do
`sage -pip install RISE`
from a terminal (in arbitray directory), I get
`sage-run received unknown option: -pip`
`usage: sage [options]`
`Try 'sage -h' for more information`
Note however that `sage -n jupyter` launches Jupyter correctly.
Thanks!JCMon, 19 Aug 2019 15:25:07 -0500https://ask.sagemath.org/question/47513/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 09:30:33 -0500https://ask.sagemath.org/question/43919/Get output of a .py file in a browserhttps://ask.sagemath.org/question/46004/get-output-of-a-py-file-in-a-browser/It seems like basic question, but I already spent about 2 hours, tried jupyter, command line, different combinations, different commands, lots of stuff…
Basically, I have file `test.py` with one line of content, taken straight from docs:
```
plot(graphs.HeawoodGraph())
```
I want to evaluate it, and get a picture of the plot in a browser.
What I don't want:
* to open some external app for PNG files because in future I gonna need interactivity
* to open the file in some text editor inside a browser because I already have it opened in Emacs
* to get errors about `graphs` being undefined because when I execute in `sage` terminal, it's all correctly defined.
* to search for `import`s to run every particular sage example from docs, because typing those examples directly in `sage` interactive interpreter works just fine *(the examples don't include `import`s)*, so I see no reason to put an unnecessary effort over that.Hi-AngelWed, 03 Apr 2019 09:21:06 -0500https://ask.sagemath.org/question/46004/sage 8.5 windows jupyter can't workhttps://ask.sagemath.org/question/45052/sage-85-windows-jupyter-cant-work/i use a windows laptop with Chinese. i download the windows installer, and install the sage 8.5 successfully. it can run sage(shell) correctly, but when i launch the jupyter, something wrong with it.
"sage -n" use the cmd to start a server, i got
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 268, in
launcher(unknown)
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 142, in init
super(SageNBExport, self).init(argv)
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 100, in init
main(argv)
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 89, in catch_config_error
app.print_help()
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 385, in print_help
self.print_subcommands()
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 377, in print_subcommands
print(os.linesep.join(lines))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)
so i try some solutions, i can skip this step, but i got stuck in the jupyter launch step:
Could not decode '\xe6\x9c\xaa\xe5\x91\xbd\xe5\x90\x8d' for unicode trait 'untitled_notebook' of a LargeFileManager instance.
i know there is something wrong with the coding in python (and there are many problems when software operate with Chinese), but i can't find the right way to solve itlinuxCipherTue, 15 Jan 2019 04:49:27 -0600https://ask.sagemath.org/question/45052/jupyter tutorialhttps://ask.sagemath.org/question/45346/jupyter-tutorial/ My university department is updating the instance of sagemath that we use to 8.6. This will use the new Jupyter interface. I have two questions about the upgrade:
1) The old instance of sage we are running has many users each with their own notebooks. How do we migrate the multi-user environment to sagemath with Jupyter?
2) All of our sagemath users will need to migrate to using Jupyter. Is there a good tutorial for using sagemath in Jupyter? The [http://www.sagemath.org/help.html](http://www.sagemath.org/help.html) documentation and tutorials in sagemath's website still are referencing the old notebooks.
thanks
brettbrettpimWed, 06 Feb 2019 15:39:13 -0600https://ask.sagemath.org/question/45346/How to attach a simple Sage script in a Sage Jupyter notebookhttps://ask.sagemath.org/question/43964/how-to-attach-a-simple-sage-script-in-a-sage-jupyter-notebook/**My two PCs' configurations:** Windows 8.1, Windows 10
**Sage version:** SageMath 8.3, windows installer 0.4
github.com/sagemath/sage-windows/releases
I want to use a Sage script in a Sage Jupyter Notebook (Jupyter with Sage as a kernel).
I have tried the following procedure:
1. I put a Sage code (definition of a function) in text file named Script.sage.
2. In a Jupyter notebook I tried command attach('Script.Sage')
3. I got a usage error:
UsageError: Invalid GUI request 'sage', valid ones are:[None, 'widget', 'qt5', 'qt', 'nbagg', 'osx', 'gtk', 'qt4', 'gtk3', 'notebook', 'tk', 'ipympl', 'inline', 'asyncio', 'wx']
Some advice about where is a problem? What to do?
Or is there another procedure how to use a Sage code written in separate files in a Jupyter notebook?
JozefTue, 16 Oct 2018 07:31:13 -0500https://ask.sagemath.org/question/43964/