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.Thu, 12 Sep 2019 14:49:45 -0500SageAppliance not more maintained after 8.1?https://ask.sagemath.org/question/47860/sageappliance-not-more-maintained-after-81/ Hi all.
I am coming back to Sage after a long time. Working under Windows, I used Sage under VirtualBox without particular problems. Now I see that there exist direct Windows binaries, but with some limitations (e.g. it is not possible to install further packages). So I tried to also download the latest SageAppliance, but I noticed that, while completely absent in many mirrors, in some of them there is still at maximum the old 8.1.ova. So I would like to ask if the virtual appliances are not more maintained, and if for Windows it is mandatory to use the binaries, with the present limitations.
Thanks.AntlabThu, 12 Sep 2019 14:49:45 -0500https://ask.sagemath.org/question/47860/displaying png in sage-8.1.ova VirtualBox notebookhttps://ask.sagemath.org/question/45732/displaying-png-in-sage-81ova-virtualbox-notebook/Hi
As I encountered freeze and slowdown issues with the W10 upgrade version 1809 and the version generated by SageMath-8.6-Installer-v0.4.1.exe for W10, I got back to my sage-8.1.ova version with VirtualBox.
but when I execute the code below, nothing happens !, no error message either. And the image does not appear.
#P375example7_6PI.ipynb
############################
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from matplotlib.pyplot import figure
figure(num=None, figsize=(20, 10), dpi=100, facecolor='w', edgecolor='k')
#imgPath="C:\\Users\\jean-pierre\\Documents\\SageMath\\IPYNB\\"
imgPath="/home/sage/Documents/"
img = mpimg.imread(imgPath+"p375Ex7_6.png")
#img = mpimg.imread("p375Ex7_6.png")
imgplot = plt.imshow(img)
![image description](/upfiles/15521212287455305.jpg)ortolljSat, 09 Mar 2019 02:49:43 -0600https://ask.sagemath.org/question/45732/How can I configure the Sage VirtualBox Appliance?https://ask.sagemath.org/question/39520/how-can-i-configure-the-sage-virtualbox-appliance/ I am working the with most recent Sage virtual box (ova) appliance, and I am trying to install LaTeX and all available kernels. I have been writing down exactly what I have done, which I plan to provide the community as a tutorial when everything is working. The problem is that I don't have a lot of experience with Linux, and so I'm basically hacking and slashing, as I can't find any documentation for how the appliance was configured or how to add LaTeX to the already-configured TeX install.
My question is, what's the best way to add functionality? Where should I install new things?
As an example:
I wanted to start with LaTeX. Sage seems to have it's own environment with a working TeX, but it can't find pdfLaTeX for printing a notebook. I tried installing with yum, but CentOS installs an incomplete version that doesn't have a TeX package manager, so I can't add the missing LaTeX packages. I built LaTeX from source and it worked, but when I tried to install Ruby, yum installed the default LaTeX anyway, which then broke printing from jupyter using pdfLaTeX because it now found the one yum installed without the needed packages and ignores mine. I want to add pdfLaTeX to the preconfigured TeX environment in Sage so that Ruby and other languages can find it.
I'd build a box from scratch, but I cannot duplicate the functionality of jupyter notebook (where it comes up as a server for my host box) installing things from source, so I am trying to configure the pre-packaged ova, and since Sage is set up to be self-contained there, I cannot get things installed through yum to find the things installed in Sage. What am I doing wrong? Or was this not really something the ova was designed for?jordana309Mon, 13 Nov 2017 15:13:16 -0600https://ask.sagemath.org/question/39520/How can I most easily configure the SageVM?https://ask.sagemath.org/question/39519/how-can-i-most-easily-configure-the-sagevm/I am working the with most recent Sage virtual box (ova) appliance, and I am trying to install LaTeX and all available kernels. I have been writing down exactly what I have done, which I plan to provide the community as a tutorial when everything is working. The problem is that I don't have a lot of experience with Linux, and so I'm basically hacking and slashing, as I can't find any documentation for how the appliance was configured or how to add LaTeX to the already-configured TeX install.
My question is, what's the best way to add functionality? Where should I install new things?
As an example:
I wanted to start with LaTeX. Sage seems to have it's own environment with a working TeX, but it can't find pdfLaTeX for printing a notebook. I tried installing with yum, but CentOS installs an incomplete version that doesn't have a TeX package manager, so I can't add the missing LaTeX packages. I built LaTeX from source and it worked, but when I tried to install Ruby, yum installed the default LaTeX anyway, which then broke printing from jupyter using pdfLaTeX because it now found the one yum installed without the needed packages and ignores mine. I want to add pdfLaTeX to the preconfigured TeX environment in Sage so that Ruby and other languages can find it.
I'd build a box from scratch, but I cannot duplicate the functionality of jupyter notebook (where it comes up as a server for my host box) installing things from source, so I am trying to configure the pre-packaged ova, and since Sage is set up to be self-contained there, I cannot get things installed through yum to find the things installed in Sage. What am I doing wrong? Or was this not really something the ova was designed for?jordana309Mon, 13 Nov 2017 15:12:11 -0600https://ask.sagemath.org/question/39519/Installing a package (using VirtualBox on Windows)https://ask.sagemath.org/question/38177/installing-a-package-using-virtualbox-on-windows/I am trying to load a package (libbraiding) to use its functions in my .ipynb file. I accessed the terminal on VirtualBox using Host+F1 and typed sage for both the username and password. Then I entered the command "sage -i libbraiding". The terminal did some stuff for about a minute and then showed "Sage build/upgrade complete!". However, I still cannot use the functions in the package as the notebook says "NameError: global name 'left_normal_form' is not defined". What am I doing wrong? Any help will be much appreciated.dhk628Tue, 04 Jul 2017 21:57:32 -0500https://ask.sagemath.org/question/38177/Ctrl F1 Ctrl F2 Terminal modehttps://ask.sagemath.org/question/37141/ctrl-f1-ctrl-f2-terminal-mode/ Hi
Ctrl F1 is ok for going in terminal window but Ctrl F2 does not allow me to quit terminal mode !
the only way I find is to Off/On the VM Which is a little bit long !.
on the other hand how do I open the pdf tutorial in the VM ?
(I copied the tutorial PDF in /sage/home/sage/SageTuto).
I found Sage very very complicated, I m not sure to continue with it.
ortolljFri, 31 Mar 2017 08:08:45 -0500https://ask.sagemath.org/question/37141/I have installed a Virtual VM and Sage on my Windows PC. How do I start an interactive Sage shell?https://ask.sagemath.org/question/29527/i-have-installed-a-virtual-vm-and-sage-on-my-windows-pc-how-do-i-start-an-interactive-sage-shell/I know I am supposed to type "Sage" somewhere, but where? dilettanteMon, 21 Sep 2015 21:09:17 -0500https://ask.sagemath.org/question/29527/How can I exit help?https://ask.sagemath.org/question/36278/how-can-i-exit-help/ I'm in a Sagemath 7.4 notebook. I click Help and choose a topic. It claims it is opening in a new "tab." Then I am stuck in help (presumably a Chromium tab) until I reboot the VirtualBox VM! If I had a keyboard shortcut to switch tabs or close the current tab, I think I'd be in business. As it stands, I'm stuck outside Sage until I reset the VM.Al in St LouisThu, 12 Jan 2017 21:56:52 -0600https://ask.sagemath.org/question/36278/How can I exit help?https://ask.sagemath.org/question/36277/how-can-i-exit-help/ I'm in a Sagemath 7.4 notebook. I click Help and choose a topic. It claims it is opening in a new "tab." Then I am stuck in help (presumably a Chromium tab) until I reboot the VirtualBox VM! If I had a keyboard shortcut to switch tabs or close the current tab, I think I'd be in business. As it stands, I'm stuck outside Sage until I reset the VM.Al in St LouisThu, 12 Jan 2017 21:55:52 -0600https://ask.sagemath.org/question/36277/syntax error when doing try-except with the except commandhttps://ask.sagemath.org/question/36168/syntax-error-when-doing-try-except-with-the-except-command/I am running sage via virtual box and for some reason I am getting a syntax error for except. I was wondering if this wasn't available because I am using virtual box or if I am doing something wrong.
example below,
sage: def total_chromatic_number(G, certificate=False):
....: nmax = len(G) + len(G.edges()) # trivial upper bound on the number of colors.
....: for n in range(1,nmax+1):
....: p = MixedIntegerLinearProgram()
....: bv = p.new_variable(binary=True)
....: be = p.new_variable(binary=True)
....: for v in G.vertices():
....: p.add_constraint(sum(bv[v,c] for c in range(n)) == 1)
....: for e in G.edges(labels=False):
....: p.add_constraint(sum(be[e,c] for c in range(n)) == 1)
....: for v in G.vertices():
....: for c in range(n):
....: p.add_constraint(bv[v,c] + sum(be[e,c] for e in G.edges_incident(v, labels=False)) <= 1)
....: for v,w in G.edges(labels=False):
....: for c in range(n):
....: p.add_constraint(bv[v,c] + bv[w,c] + be[(v,w),c] <= 1)
....: try:
....: p.solve()
....: if certificate:
....: bv_sol = p.get_values(bv)
....: be_sol = p.get_values(be)
....: coloration = {}
....: for v in G.vertices():
....: for c in range(n):
....: if bv_sol[v,c] == 1:
....: coloration[v] = c
....: for e in G.edges(labels=False):
....: for c in range(n):
....: if be_sol[e,c] == 1:
....: coloration[e] = c
....: return coloration
....: else:
....: return n
....: except MIPSolverException:
File "<ipython-input-17-059a0ac5e5a6>", line 34
except MIPSolverException:
^
SyntaxError: invalid syntaxlivvy94Wed, 04 Jan 2017 07:29:30 -0600https://ask.sagemath.org/question/36168/Notebook access in Sage 7.3 via Oracle VMhttps://ask.sagemath.org/question/35253/notebook-access-in-sage-73-via-oracle-vm/I am a new Sage user. I have been experimenting with Sage 7.3 on my Windows laptop using Oracle VirtualBox (Version 5.1.6 r110634). When I initialize Sage in Jupyter, the only way I have been able to use the notebook version is to first open a saved Jupyter Sage document I named Initialize_Notebook_Sage.ipynb and then executing the command **notebook()**. From that point, the application resets (after a short delay) and I have access to previously saved Sage Notebooks with the interface I expected. I tried to access notebooks through a browser using http://localhost:8080, but was unsuccessful.
While this workaround gets me to the desired interface, it is not the most elegant. Is there a way to access the Sage Notebook directly from the Jupyter screen or from the VirtualBox screen?
Thanks in advance for your help.srobbertTue, 25 Oct 2016 14:22:31 -0500https://ask.sagemath.org/question/35253/How to open jupyter in virtualbox from shared folder?https://ask.sagemath.org/question/34983/how-to-open-jupyter-in-virtualbox-from-shared-folder/If I install the SageAppliance in windows, the jupyter notebook is started automatically with some internal folder as the base directory. I would like it to start from a custom folder on a shared drive, i.e. a local folder that I enabled for sharing with the virtual machine. Could anyone give me a tip how to do this. In other words, I want to first cd into that shared folder and only then start the jupyter notebook. Is there a way to do that automatically?
Thanks a lot!
StanstanWed, 28 Sep 2016 07:04:18 -0500https://ask.sagemath.org/question/34983/How can I extract my notebooks from an old hard drive?https://ask.sagemath.org/question/35148/how-can-i-extract-my-notebooks-from-an-old-hard-drive/I recently had to switch from Ubuntu to Windows 7. Doing so, unfortunately I crashed my Linux installation.
Is there any way I can extract SageMath notebooks from my home folder? I copied the ~/.sage directory but can't make sense of the folder structure. The goal would be to run my old notebooks in a SageAppliance.peterFri, 14 Oct 2016 03:29:56 -0500https://ask.sagemath.org/question/35148/Syntax error with power functionhttps://ask.sagemath.org/question/34779/syntax-error-with-power-function/Hello, I'm running sage on virtual box and changed the keyboard layout to german. It works well, except the ^-function leads to a syntax error. Sage recognizes the power by setting the power number high. Can you help me? Best regard, HenningHenningThu, 08 Sep 2016 13:03:31 -0500https://ask.sagemath.org/question/34779/I installed Sage-7.2. What do I do now?https://ask.sagemath.org/question/34597/i-installed-sage-72-what-do-i-do-now/I managed to install VirtualBox and import Sage-7.2. When I click on the green Start arrow a windows with a brief message saying Booting CentOS 6.7 appears and then changes into a mostly white screen with the following elements:
A menu with File Machine View Input Devices Help
jupyter
Three tabs with File Running Clusters
A line with "Select items to perform actions on them"
Two folder icons with the names Sage and Sage 7.2
Two file icons with the names notebook-browser and sage-notebook.log
I clicked on notebook-browser and the screen showed the following three lines:
#!/usr/bin/env bash
# Kiosk-mode browser for the notebook
/usr/bin/chromium-browser --no-first-run --kiosk "$@"
I tried to calculate 2+2 but neither Enter nor Shift-Enter had any effect except moving to the next line.
Can someone help?
Thanks.SoldalmaFri, 26 Aug 2016 10:44:02 -0500https://ask.sagemath.org/question/34597/VM Virtualbox & sage-7.2.ova: how to start?https://ask.sagemath.org/question/33850/vm-virtualbox-sage-72ova-how-to-start/I downloaded and loaded sage-7.2.ova, opened localhost:8000/edit/notebook-browser, but do not know what to do next. There is no command "Run" or something like that.DSblizzardSun, 19 Jun 2016 13:06:21 -0500https://ask.sagemath.org/question/33850/How to import the file "function.py" to worksheet sage? sagemath loaded by virtual machine (VirtualBox)https://ask.sagemath.org/question/32474/how-to-import-the-file-functionpy-to-worksheet-sage-sagemath-loaded-by-virtual-machine-virtualbox/i want to import a file function called "function.py" to my Worksheet. How to do?jmarcellopereiraSat, 06 Feb 2016 14:12:15 -0600https://ask.sagemath.org/question/32474/VM Virtualbox & sage-7.0.ova: how to start?https://ask.sagemath.org/question/32344/vm-virtualbox-sage-70ova-how-to-start/Hi,
I downloaded sage-7.0.ova and I imported it in VM Virtualbox. <b>What are the next steps?</b>
Using http://localhost:8000/home/admin within my browser doesn't work, as it did up to sage-6.10.ova. <br>
The information on https://wiki.sagemath.org/SageAppliance isn't helpful. <br>
Also https://groups.google.com/forum/#!topic/sage-support/CacnfZbIGiI didn't give much information.
Are these the steps for Sage-7.0 for Windows / VM Virtualbox? <br>
1) load sage-7.0.ova as normal in VM Virtualbox <br>
2) Go to http://localhost:8000/tree within your browser <br>
3) On the top right select New and than SageMath 7.0 <br>
4) You see at the top Jupyter Notebook Untitled <br>
5) You have to select Run instead of pressing Enter to perform a command <br>
<b>If so, how to upload my *.sws files?</b>
Thanks for answering.
RolandbWed, 27 Jan 2016 02:07:12 -0600https://ask.sagemath.org/question/32344/Keyboard layout to Qwertz VMhttps://ask.sagemath.org/question/30484/keyboard-layout-to-qwertz-vm/ Hi guys,
I am using Sage 6.8 VirtualBox on a Windows.
I am new to sage and it's been a while I have been trying to change the keyboard layout of my VM into my Qwertz Keyboard layout.
I have seen the steps: nano .xinitrc / setxkbmap [countrycode]
I come from Switzerland so I have tried to put country code CH, DE but it seems to stay on a Qwerty keyboard layout....
Could someone help me please?
Thanks a lot!ZouZouThu, 05 Nov 2015 08:13:22 -0600https://ask.sagemath.org/question/30484/notebook() in Virtual boxhttps://ask.sagemath.org/question/27176/notebook-in-virtual-box/ Hello,
I am very new to SageMath and Virtual machine.
I am using Windows 7 64bit and Oracle Virtual machine. I run Sage 6.7 as is describe at http://wiki.sagemath.org/SageAppliance. My problem is, when I use Host (RCtrl) + F1 i will get to shell. I run sage from shell so far so good.
What i should do to get back to web interface?
RCtrl + F2 do not work (however F7) but no code will be in web interface.
If I run notebook() I have following message
The notebook files are store in:sage_notebook.sagenb
Another server Sage Notebook is running, PID 1497
sage:/usr/bin/xdg-open: line 402: htmlview: command not found
/usr/bin/xdg-open: line 402: firefox: command not found
/usr/bin/xdg-open: line 402: mozilla: command not found
/usr/bin/xdg-open: line 402: netscape: command not found
/usr/bin/xdg-open: line 402: links: command not found
/usr/bin/xdg-open: line 402: lynx: command not found
xdg-open: no method available for opening 'http://localhost:8000/'
Why is does happenig? Because Sage server was shut down?
Thank you very much in advance Jakubkubak123Sun, 21 Jun 2015 08:40:15 -0500https://ask.sagemath.org/question/27176/Is there some import I need to do for defining variables?https://ask.sagemath.org/question/26697/is-there-some-import-i-need-to-do-for-defining-variables/I have been running Sage 6.6 through VirtualBox and whenever I define a variable I get an error, like for example (for `a,b,c = var('a,b,c')`):
File "<stdin>", line 1, in <module>
File "_sage_input_25.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSxiLGMgPSB2YXIo4oCZYSxiLGPigJkpCnFlID0gKGEqeF4yICsgYip4ICsgYyA9PSAwKQpwcmludCBzb2x2ZShxZSwgeCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpAUEAbf/___code___.py", line 3
a,b,c = var(’a,b,c’)
^
SyntaxError: invalid syntaxFusion809Fri, 01 May 2015 02:50:24 -0500https://ask.sagemath.org/question/26697/VirtualBox Error During Sage Installationhttps://ask.sagemath.org/question/26292/virtualbox-error-during-sage-installation/Hello,
I am brand-new to Sage.
I'm running Windows 7, 64-bit OS.
I downloaded Sage from here: http://mirrors-usa.go-parts.com/sage/win/index.html and downloaded VirtualBox. When I try to open Sage with VirtualBox, I get the following error message:
Failed to import appliance C:/Users/mcdonope/Desktop/sage-6.4.1.ova.
Could not create the imported medium 'C:\Users\mcdonope\VirtualBox VMs\Sage-6.4.1\sage-6.4.1-disk1.vmdk'.
VMDK: Compressed image is corrupted 'C:\Users\mcdonope\sage-6.4.1-disk1.vmdk' (VERR_ZIP_CORRUPTED).
Details
Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}
What am I doing wrong? Any advice is greatly appreciated!
TriciamcdonopeMon, 23 Mar 2015 19:32:36 -0500https://ask.sagemath.org/question/26292/no method available for opening http localhost 8000 (second part)https://ask.sagemath.org/question/25222/no-method-available-for-opening-http-localhost-8000-second-part/I have exactly the same problem as in [this question](http://ask.sagemath.org/question/9162/no-method-available-for-opening-http-localhost-8000/#).
It has an answer with two solutions:
- install a web browser inside the VM,
- punch port 8000 through to the host and use the host web browser.
I want to use the second option but I cannot understand it. Could somebody explain in detail the second option?emiliocbaThu, 11 Dec 2014 10:35:46 -0600https://ask.sagemath.org/question/25222/Virtualbox and Chromiumhttps://ask.sagemath.org/question/24771/virtualbox-and-chromium/ Hi, I've been using sage.5.11 on VirtualBox running on a Windows 7 computer. I would like to know a couple of things:
1. How to go from the Notebook mode to a command line mode
2. How to return to the Notebook mode after I clicked on a link to view truncated output
3. Booting into Command Line SAGE instead of Notebook mode as it is doing currently
Thanks for your help in advance.BlackadderMon, 03 Nov 2014 20:24:20 -0600https://ask.sagemath.org/question/24771/qwerty to azertyhttps://ask.sagemath.org/question/24376/qwerty-to-azerty/ I; zorking on zindozs 7 (Im working on windows7) virtualbox launch my version of sage but in qwerty. I want to change that. I looked on internet,><M>?>>?><MNB/.,m,m.. (was a try to write a point)MiaouThu, 02 Oct 2014 12:53:35 -0500https://ask.sagemath.org/question/24376/How do I modify the 6.3 virtual to remove the login page in windows?https://ask.sagemath.org/question/24147/how-do-i-modify-the-63-virtual-to-remove-the-login-page-in-windows/I guess that somewhere in some script file I need to change a "sage --notebook" to "sage --notebook automatic_login=True", but I can't find the script and I don't know anything about CentOS (and not much more about Linux). Is it in one of the rc.?? files in /etc/rc.d/?RobTue, 16 Sep 2014 08:03:41 -0500https://ask.sagemath.org/question/24147/!f2py not workinghttps://ask.sagemath.org/question/23594/f2py-not-working/Why is the command line F2PY tool not working with my sage installation?
The command `!f2py` on the sage shell returns
f2py*
-bash: f2py*: command not found
Do I have to be in the right folder for the tool to work?
I run sage in a virtual machine under Windows 7.
[Sage 6.2 Documentation referring to f2py (the section referring to the command line tool is at the very bottom](http://www.sagemath.org/doc/numerical_sage/f2py.html)jjackSat, 26 Jul 2014 13:03:48 -0500https://ask.sagemath.org/question/23594/Trouble Installing Plotly on a Sage VirtualBoxhttps://ask.sagemath.org/question/11348/trouble-installing-plotly-on-a-sage-virtualbox/Trouble Installing Plotly on a Sage VirtualBox
I am trying to use plotly on a virtual box vm using the downloaded
virtual machine image of SageMath.
I can get to the command line, <Right-Ctrl and F1>
I did not have pip which is used to install plotly but got it with
"sudo yum -y install python-pip"
then ran pip to get plotly
"sudo /usr/bin/pip-python ///install plotly"
back in sage <Right-Ctrl and F2>
"import plotly"
fails
but at the linux command line
"python"
"import plotly"
works, so possibly I installed to the wrong copy of python?
from http://ask.sagemath.org/question/3481/how-to-upgrade-a-python-package-with-pip
also tried some variaions on "sage --python /usr/bin/pip-python install"
all of which failed
any help?russ_henselThu, 27 Mar 2014 06:09:40 -0500https://ask.sagemath.org/question/11348/Failed to load Sage session: VB + Sage 3.15https://ask.sagemath.org/question/10874/failed-to-load-sage-session-vb-sage-315/I have Sage 5.13 and VirtualBox 4.3.2 downloaded and installed on a Win7 machine.
First time I run the programs everything works well, when I try to reopen the files I left in VB (Save machine state), I get the following error message:
***
Failed to open a session for the virtual machine Sage-5.13.
Failed to load unit 'PATM' (VERR_SSM_LOADED_TOO_MUCH).
Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}
***
I tried to download the majority of the notebooks I worked on and leave in VB only one, however, the message appears again.
Oklahoma16Thu, 02 Jan 2014 01:21:16 -0600https://ask.sagemath.org/question/10874/Load .sage file into sage with VirtualBox Windows 8https://ask.sagemath.org/question/10745/load-sage-file-into-sage-with-virtualbox-windows-8/Hello there
I have problems to load a sage file into VirtualBox using Shared Folder. I have created a shared folder with volume name Newfolder and it's in /media/sf_Newfolder with files dghv.sage from https://github.com/coron/fhe inside of it. I tried to follow http://wiki.sagemath.org/SageAppliance with attach command but it showed error. In the github it said to load the sage file, so i use cd command cd /root/media/sf_Newfolder and load "dghv.sage" but it doesn't work and syntax error in it.
Can you help me?
ThanksihsanhaikalzSun, 17 Nov 2013 08:14:04 -0600https://ask.sagemath.org/question/10745/