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, 02 Mar 2021 05:44:48 +0100- Jupyter notebook: plot() fails to produce graphhttps://ask.sagemath.org/question/55991/jupyter-notebook-plot-fails-to-produce-graph/ Just installed Sage on my Windows 10 machine. When I try to run plot(sin, (0.0, 10.0)), or any other plot, I only get the error message: "The kernel appears to have died. It will restart automatically." What can I do?
Thanks for your help.
BobbobmccroryTue, 02 Mar 2021 05:44:48 +0100https://ask.sagemath.org/question/55991/
- kernel dies on plothttps://ask.sagemath.org/question/55774/kernel-dies-on-plot/I have a clean installation of SageMath on Windows 10:
SageMath version 9.2, Release Date: 2020-10-24. Using Python 3.7.7.
When I try to plot anything with SageMath notebook, e.g.
P = plot(sin, (0, 10))
P
the kernel dies. This happens on Firefox and Chrome.
How can this be? Many thanks.OldMortalityFri, 19 Feb 2021 21:28:01 +0100https://ask.sagemath.org/question/55774/
- Crash when plotting in Sage in Windowshttps://ask.sagemath.org/question/55762/crash-when-plotting-in-sage-in-windows/I have recently installed SageMath in my Windows 10 PC.
Normal calculations like addition work.
But when i try to plot some functions, Sage crashes.
plot(sin(x))avinashThu, 18 Feb 2021 13:39:43 +0100https://ask.sagemath.org/question/55762/
- Gurobi backend problemhttps://ask.sagemath.org/question/55688/gurobi-backend-problem/Hello,
I am trying to attach gurobi backend to my sage. I downloaded gurobi and its licence, I can use it in cmd but I found no guide on how to use it with sage on Windows 10, which i am currently using. I used guide for Linux from pypi.org/project/sage-numerical-backends-gurobi/ and I tried different approaches. I decided to download gurobi in my sage shell in /opt/ folder, I exported all neccessary variables but after running *gurobi.sh* i get this error: *gurobi.sh: line 17: /opt/gurobi911/linux64//bin/python3.7: cannot execute binary file: Exec format error* Is my approach correct? How can I achieve my goal? Thanks in advance.GrabolSat, 13 Feb 2021 10:28:35 +0100https://ask.sagemath.org/question/55688/
- Use .sagews or .sws files with Sage in Windows 10https://ask.sagemath.org/question/54152/use-sagews-or-sws-files-with-sage-in-windows-10/How do you use `.sagews` or `.sws` files
(created in an older Sage or in CoCalc)
with Sage in Windows 10 on a desktop PC?fredrickmnelsonSun, 08 Nov 2020 05:13:02 +0100https://ask.sagemath.org/question/54152/
- how to install Fricas in SageMath 9.2 W10?https://ask.sagemath.org/question/54586/how-to-install-fricas-in-sagemath-92-w10/Hello
what is the good way to install Fricas Package for SageMath 9.2 notebook W10
I tried to install Fricas package in SageMath Shell with the command: `sage -i fricas`
but it looks like the installation process will never stop !.(and its impossible to stop it)
could you tell me precisely in which shell do i need to enter this command ?
![image description](/upfiles/1607356001564995.png)ortolljSun, 06 Dec 2020 16:30:11 +0100https://ask.sagemath.org/question/54586/
- How does one use Sage under Windows 10?https://ask.sagemath.org/question/54166/how-does-one-use-sage-under-windows-10/ How does one use Sage under Windows 10?fredrickmnelsonSun, 08 Nov 2020 22:20:51 +0100https://ask.sagemath.org/question/54166/
- Use of threejs and jmol in sage 9.1 for windowshttps://ask.sagemath.org/question/53861/use-of-threejs-and-jmol-in-sage-91-for-windows/ I have been using SageMath 9.1 in Ubuntu 18.04 and the performance is excellent -- no questions asked.
Now I am trying to use SageMath 9.1 in a Msc level course, but the students' computers are all under Windows 10, and so on the classroom computer I have installed the latest 64 version of SageMath 9.1(with the 3 icons in the desktop, including the Jupyter NB which is the environment I always use). Using it, 3D scenes can only be seen as still images using "viewer='tachyon'". When using "viewer='jmol'" or "viewer='threejs'",there is no error message a scene is created, but it is empty -- blank space, no image. It seems that threejs and jmol are bundled in the repo for the Windows version of SageMath but for some reasons do not work.
In Windows 10 I have anaconda3 installed with Python 3 environment and Jupyter NB. Using it, I have tried to install Sagemath 9.1 from conda-forge using 'conda' (insluding conda-forge as a channel, with and without 'mamba' -- according to the respective instructions in the Sage manual for installing sage from anaconda) and this worked well in Ubuntu but not in Windows 10 -- in the latter case I get error message on the anaconda prompt:
Encountered problems while solving.
Problem: nothing provides requested sage
I have now also installed node.js and npm and, via the latter, also three.js . However, the installed SageMath does not recognize this version, and I do not know how to import it in the installed SageMath 9.1.
As a last measure, I have also installed the latest 64 version of Java and the latest 64 version of jmol (to be used via double-click on jmol.jar in the decompressed jmol bundle). The problem is similar as with threejs: the SageMath 9.1 does not recognize the installed jmol, and I do not know how to make it do so.
This is the situation. Can you help resolve this? I need to be able to use at least one of threejs and/or jmol (preferably, threejs!!) as alternative to tachyon in visualizing 3D scenes. Otherwise, I will have to radically restructure the course without using SageMath, since using Linux instead of Windows is, unfortunately, not an option. ShaolinuxMon, 12 Oct 2020 13:35:15 +0200https://ask.sagemath.org/question/53861/
- Displaying result problemhttps://ask.sagemath.org/question/53208/displaying-result-problem/The results of the following code is perfectly displayed in QSagemath server but not in v 9.1 under windows 10
%display latex
A=[0.8,0.44],[0.05,0.1],[0.1,0.36]
b=(24000,2000,6000)
c=(108.21,72.522)
P=InteractiveLPProblemStandardForm(A,b,c,["x_1","x_2"],slack_variables=["e_3","e_4","e_5"])
P = P.standard_form()
P.run_simplex_method()
P = P.standard_form()
P.run_simplex_method()CyrilleFri, 28 Aug 2020 17:20:43 +0200https://ask.sagemath.org/question/53208/
- Using ? for help in version 9.1https://ask.sagemath.org/question/53086/using-for-help-in-version-91/The use of a question mark (`?`) for help produces several deprecation warnings:
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/models.py:847: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:67: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:80: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:93: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:108: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:122: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:136: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/api.py:148: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:498: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:509: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:520: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:533: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:544: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:555: DeprecationWarning: invalid escape sequence \*
"""
/opt/sagemath-9.1/local/lib/python3.7/site-packages/requests/sessions.py:565: DeprecationWarning: invalid escape sequence \*
"""
Am I doing something wrong?julesbesacMon, 17 Aug 2020 12:15:07 +0200https://ask.sagemath.org/question/53086/
- DeprecationWarning on SageMath 9.1 Consolehttps://ask.sagemath.org/question/53120/deprecationwarning-on-sagemath-91-console/
When I open SageMath Console, it will show such a paragraph:
> /opt/sagemath-9.1/local/lib/python3.7/site-packages/psutil/_pscygwin.py:311: DeprecationWarning: invalid escape sequence \d
search = re.compile('cpu\d')
> /opt/sagemath-9.1/local/lib/python3.7/site-packages/psutil/_pscygwin.py:876: DeprecationWarning: invalid escape sequence \d
def uids(self, _uids_re=re.compile(b'Uid:\t(\d+)')):
> /opt/sagemath-9.1/local/lib/python3.7/site-packages/psutil/_pscygwin.py:887: DeprecationWarning: invalid escape sequence \d
def gids(self, _gids_re=re.compile(b'Gid:\t(\d+)')):
And the operating system I use is Windows 10 1909, the SageMath I use is version 9.1. Is this a bug?
NalakuvaraThu, 20 Aug 2020 16:56:38 +0200https://ask.sagemath.org/question/53120/
- Configuring an arara rule of sagetex on Windows 10https://ask.sagemath.org/question/52840/configuring-an-arara-rule-of-sagetex-on-windows-10/ This question has been cross-posted on tex.sx here https://tex[dot]stackexchange[dot]com/q/557131/2288.
----------
When using the following `sagetex.yaml` arara rule
!config
# SageTeX-Rule for arara.
identifier: sagetex
name: SageTeX
authors:
- TeXnician (Author)
- cis (Idea)
arguments: []
commands:
- name: A SageTeX Rule for arara
command: >
@{
pathToBashExecutive = "C:\\Program Files\\SageMath 9.1\\runtime\\bin\\bash";
pathToSageStartfile = "C:/Program Files/SageMath 9.1/runtime/opt/sagemath-9.1/sage";
pathOfCurrentWorkingFolder = currentFile().getParent();
theWindowsCommand = getCommand(pathToBashExecutive, "-l", pathToSageStartfile, "-c", "os.chdir('" + pathOfCurrentWorkingFolder + "'); load('" + getBasename(currentFile()) + ".sagetex.sage')");
return isWindows(theWindowsCommand, getCommand("sage", getBasename(reference) + ".sagetex.sage"));
}
to compile the following document
% arara: lualatex
% arara: sagetex
% arara: lualatex
\documentclass{article}
\usepackage{sagetex}
\begin{document}
Using Sage\TeX, one can use Sage to compute things and put them into your \LaTeX{} document. For example, there are
$\sage{number_of_partitions(1269)}$ integer partitions of $1269$.
You don't need to compute the number yourself, or even cut and paste it from somewhere.
Here's some Sage code:
\begin{sageblock}
f(x) = exp(x) * sin(2*x)
\end{sageblock}
The second derivative of $f$ is
\[
\frac{\mathrm{d}^{2}}{\mathrm{d}x^{2}} \sage{f(x)} =
\sage{diff(f, x, 2)(x)}.
\]
Here's a plot of $f$ from $-1$ to $1$:
\sageplot{plot(f, -1, 1)}
\end{document}
I get this error
> SyntaxError: (unicode error)
> 'unicodeescape' codec can't decode
> bytes in position 2-3: truncated
> \UXXXXXXXX escape
So, what should be changed in both the arara rule and, consequently, the following command to make everything work?
"C:\Program Files\SageMath 9.1\runtime\bin\bash" -l "C:/Program Files/SageMath 9.1/runtime/opt/sagemath-9.1/sage" -c "os.chdir('C:\Users\Diaa\Desktop\Test'); load('testsagetex.sagetex.sage')"DiaaMon, 03 Aug 2020 23:10:57 +0200https://ask.sagemath.org/question/52840/
- Updating Sage in Windows 10https://ask.sagemath.org/question/46958/updating-sage-in-windows-10/ The [Sage Installation Guide Release 8.7](http://doc.sagemath.org/pdf/en/installation/installation.pdf) seems to assume that one installs Sage in Windows using Cygwin, in particular regarding upgrading. However, I installed Sage on Windows 10 from the bin files without installing Cygwin at all. How should I update both Sage and the packages?
I favour an easy way that does not make me uninstall-reinstall.Jesus Martinez GarciaThu, 20 Jun 2019 17:24:07 +0200https://ask.sagemath.org/question/46958/
- inline help feature not working on jupyter notebookhttps://ask.sagemath.org/question/52746/inline-help-feature-not-working-on-jupyter-notebook/In prior Sage things that I've used, to get help with a particular function, say `matrix`, I would type `matrix?` then hit tab. However, this isn't working for me in the Jupyter notebook. avi.steinerWed, 29 Jul 2020 18:47:26 +0200https://ask.sagemath.org/question/52746/
- 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/
- Multiprocess hangshttps://ask.sagemath.org/question/51139/multiprocess-hangs/I am using SageMath 9.0 on Windows 10 (in admin mode) and following this [example](https://nbviewer.jupyter.org/github/sagemanifolds/SageManifolds/blob/master/Notebooks/SM_black_hole_rendering.ipynb).
Everything runs fine until `In [43]` where the progress bar appears but stops 1/4 through and hangs. I can see some Python processes running in the background (via the Task Manager) and the CPU and memory usage reaches 80% continuously. If left for an hour, nothing happens until I kill all processes and restart.
Anyone has encountered the same issue and has a fix?ZeJibeWed, 29 Apr 2020 12:29:09 +0200https://ask.sagemath.org/question/51139/
- How to add extensions to Jupyter?https://ask.sagemath.org/question/51101/how-to-add-extensions-to-jupyter/Hi,
One can add extensions to Jupyter, as explained on the
[jupyter-contrib-nbextensions installation page](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html),
for instance with the instruction:
pip install jupyter_contrib_nbextensions
But this instruction does not work using the SageMath 9.0 Shell (in Windows)... Any idea what to do?
RolandrolandTue, 28 Apr 2020 14:03:35 +0200https://ask.sagemath.org/question/51101/
- Problem with %attach for SageMath 9.0 on Windows 10 with .spyx fileshttps://ask.sagemath.org/question/44176/problem-with-attach-for-sagemath-90-on-windows-10-with-spyx-files/> EDIT (01/02/2020) on version 9.0.
Consider a source code reduced to the following line:
# %attach SAGE/AttachTest.spyx
When I attach it the first time, it is OK, but if I **save again** the source code, there is the following problem (which appears from version 8.3 or less). How to fix this problem?
Note that this problem is specific to .spyx files, as everything works well for .sage files.
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01 │
│ Using Python 3.7.3. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
sage: %attach SAGE/AttachTest.spyx
Compiling ./SAGE/AttachTest.spyx...
sage: 0 [main] python3.7 1214 child_info_fork::abort: unable to map \??\C:\Users\SÃ©bastien Palcoux\.sage\temp\LAPTOP-7O5QV19T\1192\spyx\_home_sage_SAGE_AttachTest_spyx\_home_sage_SAGE_A
ttachTest_spyx_0.dll (using C:\Users\SÃ©bastien Palcoux\.sage\temp\LAPTOP-7O5QV19T\1192\spyx\_home_sage_SAGE_AttachTest_spyx\_home_sage_SAGE_AttachTest_spyx_0.dll), Win32 error 126
### reloading attached file AttachTest.spyx modified at 05:48:32 ###
Compiling /home/sage/SAGE/AttachTest.spyx...
---------------------------------------------------------------------------
BlockingIOError Traceback (most recent call last)
/opt/sagemath-9.0/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py in _wrapper(*args, **kwargs)
59 try:
---> 60 return func(*args, **kwargs)
61 except OSError as e:
/opt/sagemath-9.0/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py in _query(package, *options)
69 cmd = '{0} {1} {2}'.format(pkg_config_exe, ' '.join(options), package)
---> 70 proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE)
71 out, err = proc.communicate()
/opt/sagemath-9.0/local/lib/python3.7/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
774 errread, errwrite,
--> 775 restore_signals, start_new_session)
776 except:
/opt/sagemath-9.0/local/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
1452 errpipe_read, errpipe_write,
-> 1453 restore_signals, start_new_session, preexec_fn)
1454 self._child_created = True
BlockingIOError: [Errno 11] Resource temporarily unavailable
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
<ipython-input-2-7b41dee30a81> in <module>()
----> 1 sage.repl.load.load(sage.repl.load.base64.b64decode("L2hvbWUvc2FnZS9TQUdFL0F0dGFjaFRlc3Quc3B5eA=="),globals(),True)
/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/repl/load.py in load(filename, globals, attach)
274 if attach:
275 add_attached_file(fpath)
--> 276 exec(load_cython(fpath), globals)
277 elif ext == '.f' or ext == '.f90':
278 from sage.misc.inline_fortran import fortran
/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/repl/load.py in load_cython(name)
65 """
66 from sage.misc.cython import cython
---> 67 mod, dir = cython(name, compile_message=True, use_cache=True)
68 import sys
69 sys.path.append(dir)
/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/misc/cython.py in cython(filename, verbose, compile_message, use_cache, create_local_c_file, annotate, sage_namespace, create_local_so_file)
324 try:
325 ext, = cythonize([ext],
--> 326 aliases=cython_aliases(),
327 include_path=includes,
328 compiler_directives=directives,
/opt/sagemath-9.0/local/lib/python3.7/site-packages/sage/env.py in cython_aliases()
392 for lib in ['fflas-ffpack', 'givaro', 'gsl', 'linbox', 'Singular']:
393 var = lib.upper().replace("-", "") + "_"
--> 394 aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split()
395 pc = pkgconfig.parse(lib)
396 # INCDIR should be redundant because the -I options are also
/opt/sagemath-9.0/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py in cflags(package)
106 If ``pkg-config`` not on path, raises ``EnvironmentError``.
107 """
--> 108 return _query(package, '--cflags')
109
110
/opt/sagemath-9.0/local/lib/python3.7/site-packages/pkgconfig/pkgconfig.py in _wrapper(*args, **kwargs)
60 return func(*args, **kwargs)
61 except OSError as e:
---> 62 raise EnvironmentError("pkg-config is probably not installed. Could not run pkg-config: %r"%e)
63 return _wrapper
64
OSError: pkg-config is probably not installed. Could not run pkg-config: BlockingIOError(11, 'Resource temporarily unavailable')
sage:Sébastien PalcouxSat, 03 Nov 2018 20:27:46 +0100https://ask.sagemath.org/question/44176/
- Sage 9.0 - Windows 10 - matplotlib failurehttps://ask.sagemath.org/question/49686/sage-90-windows-10-matplotlib-failure/ I've just installed Sage 9.0 on Windows 10. It's generally working except for one thing:
When I `import matplotlib.pyplot as plt`, i get the following error:
Matplotlib is building the font cache using fc-list. This may take a moment.
This never goes away. rickroeslerMon, 27 Jan 2020 05:35:50 +0100https://ask.sagemath.org/question/49686/
- Problem importing Sage library in Python script on Windowshttps://ask.sagemath.org/question/49452/problem-importing-sage-library-in-python-script-on-windows/I have a script that is fully operational which uses Sage as a python library in my python script. It runs completely normal on MacOS. However, when I tried to transfer this to work, where we are on Windows, I cannot load Sage in my python script. I get a ModuleNotFoundError.
Some background on this. My MacOS setup was generated via miniconda, including the conda package install of sage. Really, I'm only using Sage for a nice python friendly interface to Maxima, where I can do some very complex symbolic matrix computations very quickly.
On Windows, I was using MSYS2. However, after reading that Sage does not support this whatsoever, I installed Cygwin. Everything, except Sage, is running fine on Cygwin. I installed Sage via the Windows installer.
What do I need to do with the installation to get my python script to find Sage?
As an aside, is there a reason why there is no conda package for Sage on Windows, only Linux and MacOS? Trying to install Sage on Windows has been an all day, 2 day nightmare, and it is still not working. The Windows installer works fine if you just want to use Sage completely standalone. But it seems completely incompatible for integration with other languages/tools. I even tried to self compile. It took ~5-6 hours, then I got an error that one of the packages, bleach, failed. When I looked at the log for that, it seems like there was a connection issue and the source could not be downloaded. This all seems like complete overkill for using Sage in a python script.mattbWed, 08 Jan 2020 19:52:08 +0100https://ask.sagemath.org/question/49452/
- Sagemath 8.8 crash on startup on windows 10https://ask.sagemath.org/question/48218/sagemath-88-crash-on-startup-on-windows-10/i've just installed sagemath 8.8 on windows 10 with trendmicro office scan installed. after installation and when double click on SageMath icon it is launched and then crash and closed without any error messages. i've tried to add SageMath paths to be excluded from antivirus and doesn't work also .. Hassan MostafaMon, 07 Oct 2019 10:51:28 +0200https://ask.sagemath.org/question/48218/
- Sagemath for Windows: a giant headachehttps://ask.sagemath.org/question/47747/sagemath-for-windows-a-giant-headache/Hi everyone,
I've encountered two serious issues when trying to use Sagemath on Windows:
1) It is incompatible with any package that requires Anaconda for installation (e.g. QuTiP, etc..)
2) It is incompatible with popular commercial-grade Python IDE's (e.g. *PyCharm* will not recognize the Sage interpreter)
The reason why this is specific to Windows is because, **on Mac, Sage can be installed through Anaconda** (see [anaconda.org/conda-forge/sage](https://anaconda.org/conda-forge/sage) for details), thus circumventing the above issues. So everything works like a dream on Mac OS X. Here are my questions:
*1) Why is there such a disparity between the Windows and Mac situations?*
*2) Can we expect Anaconda support anytime soon? Or is it a waste of time refreshing the sagemath section of the [conda-forge](https://anaconda.org/conda-forge/sage) site from time to time?*
If anyone knows how any of these issues might be resolved (possibly by not needing to use Anaconda), please let me know! In any case, if I can't resolve these issues, then I am most likely going to revert to using *Mathematica*, which is sad, because I like how Sage is designed.droberts01Tue, 03 Sep 2019 06:39:39 +0200https://ask.sagemath.org/question/47747/
- Win 10 install issueshttps://ask.sagemath.org/question/47369/win-10-install-issues/ Followed installation instructions and came up with three icons on desktop. One labeled SageMath8.8, 2nd labeled SageMath8.8 Shell, and 3rd labeled SageMath8.8 Notebook. Actually there is a 4th that just links to these three. Each of the three icons links to a site that looks like a big blank blackboard. One has some text with about exiting. What is the difference?
How do I use them to use the **TUTORIAL**? The tutorial says to click **help**, but none of them have a help button.
I think you need better introductory material for the newby trying to get into Sage without a guide. You have a lot of stuff but it is all over the place and very confusing. I've been working on this for about three hours a day for almost a week and I haven't gotten very far.Stephen MeskinSun, 04 Aug 2019 07:03:48 +0200https://ask.sagemath.org/question/47369/
- 3d graphics not displayedhttps://ask.sagemath.org/question/46147/3d-graphics-not-displayed/I am new to Sage. I use SageMath 8.6 on Windows 10. 2D plotting works, but not 3d.
For example this produced no graphics but just the:
`𝙶𝚛𝚊𝚙𝚑𝚒𝚌𝚜𝟹𝚍𝙾𝚋𝚓𝚎𝚌𝚝`
sage: x, y = var('x,y')
sage: g = plot3d(x^2 + y^2, (x,-2,2), (y,-2,2))
sage: show(g)
𝙶𝚛𝚊𝚙𝚑𝚒𝚌𝚜𝟹𝚍𝙾𝚋𝚓𝚎𝚌𝚝
I use Chrome.
With the suggested option:
sage: show(g,figsize=8, viewer="threejs", frame=False,axes=True)
**it works now!**
It works also with:
sage: show(g,figsize=8, viewer="threejs", axes=True)
And with:
sage: show(g,figsize=8, viewer="threejs")
It looks like viewer option should be there for 3D to work on windows 10 with Chrome.
SageMath is great! With Python it is much more friendlier than Mathematica.MathF13Sun, 14 Apr 2019 00:33:42 +0200https://ask.sagemath.org/question/46147/
- 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 14:31:13 +0200https://ask.sagemath.org/question/43964/
- How do I upgrade from 8.2 to 8.3 on Windows without loosing my worksheets?https://ask.sagemath.org/question/43290/how-do-i-upgrade-from-82-to-83-on-windows-without-loosing-my-worksheets/ How do I upgrade from 8.2 to 8.3 on Windows without loosing my worksheets? Please answer for a non-OS savy, casual SageMath user. Thank you.Mark SzlazakWed, 08 Aug 2018 23:15:53 +0200https://ask.sagemath.org/question/43290/
- Using sagemath on windows 10 : impossible to attach filehttps://ask.sagemath.org/question/42870/using-sagemath-on-windows-10-impossible-to-attach-file/Hi! I've installed sagemath on windows 10 and I'm going crazy. The problem it seems to be that all the program is runing in some kind of temporal directory . I leave here some feedback from my console:
sage: load_attach_path()
['.']
If I change the path,
sage: load_attach_path('C:\Users\Javier\Desktop\current\height1')
sage: load_attach_path()
['.', 'C:\\Users\\Javier\\Desktop\\current\\height1']
So we can confirm the new path was added. Inside the folder height1 I have a file "'heigth1.sage". Let's try to attach it:
sage: attach("height1.sage")
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-4-cb4dd36405f2> in <module>()
----> 1 sage.repl.load.load(sage.repl.load.base64.b64decode("aGVpZ2h0MS5zYWdl"),globals(),True)
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach)
252 # See Trac 11812.
253 if attach:
--> 254 add_attached_file(fpath)
255 with open(preparse_file_named(fpath)) as f:
256 code = compile(f.read(), preparse_file_named(fpath), 'exec')
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/attach.py in add_attached_file(filename)
376 sage.repl.inputhook.install()
377 fpath = os.path.abspath(filename)
--> 378 attached[fpath] = os.path.getmtime(fpath)
379
380
/opt/sagemath-8.2/local/lib/python2.7/genericpath.py in getmtime(filename)
60 def getmtime(filename):
61 """Return the last modification time of a file, reported by os.stat()."""
---> 62 return os.stat(filename).st_mtime
63
64
OSError: [Errno 2] No such file or directory: '/home/Javier/C:\\Users\\Javier\\Desktop\\current\\height1/height1.sage'
----------
Recall the Error **No such file or directory: '/home/Javier/C:\\Users\\Javier\\Desktop\\current\\height1/height1.sage'**. What ?? Please, help me ! I will appreciate your feedback very much!JavidlgMon, 09 Jul 2018 17:26:08 +0200https://ask.sagemath.org/question/42870/
- Using SageMath in IDLEhttps://ask.sagemath.org/question/42652/using-sagemath-in-idle/I am trying to use IDLE with Python 2.7.15 and use functions from Sage 8.2 on a Windows 10 machine. I know that I have to have Python 2.x (which I do). My script is the following:
#! C:\Program Files\SageMath 8.2\runtime\bin\env sage -python
from sage.all import *
Suits = Set(["Hearts", "Diamonds", "Spades", "Clubs"])
Values = Set([2, 3, 4, 5, 6, 7, 8, 9, 10, "Jack", "Queen", "King", "Ace"])
Cards = cartesian_product([Values, Suits])
print(Cards.cardinality)
(from the combinat package/documentation and question/8215/using-sage-in-a-python-cgi-script/ which I can't post a direct link to because this is my first question). Then when I try to run it in IDLE I get
Traceback (most recent call last):
File "C:/Users/ME/Documents/Math/Programming/Playing/playing_1.py", line 3, in <module>
from sage.all import *
ImportError: No module named sage.all
For what its worth, I get the same error when trying to import numpy, sklearn, and pandas. I have Anaconda downloaded but I am using Python 3 in that so I presume that is where that issue is coming from. If I am wrong I'd love to know!
EDIT:
I realize I did not ask a question. My question is, can anyone help me get this to work? Thank you!trevor_kMon, 18 Jun 2018 22:45:03 +0200https://ask.sagemath.org/question/42652/
- Animated Plots Not Working on Windows 10 (Image Magick)https://ask.sagemath.org/question/42388/animated-plots-not-working-on-windows-10-image-magick/Hi,
I've looked up the following documentation:
http://doc.sagemath.org/html/en/reference/plotting/sage/plot/animate.html
and tried to use the first example after installing ImageMagick.
However when I run the script, I get nothing, and when I look in the terminal I only see "Invalid Parameter - Background Image".
I tried reinstalling ImageMagick and this time tick all the boxes, not just the default ones, and when I run the command again I get a longer message "convert.exe: unable to open image (...)", similar to what was signaled here:
https://ask.sagemath.org/question/41082/problem-imagemagick-and-animate/
I'm running SageMath8.2 on Windows 10. How can I fix this ? If the problem is that SageMath cannot find the correct paths to ImageMagick, how can I fix that ?
Thank you very much,
Turiel.
PS: I also get this message in the Notebook when I tried to run the command for the first time, it disappears when I run it again:
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while displaying object:
Error: Cannot generate GIF animation. Verify that convert
(ImageMagick) or ffmpeg is installed, and that the objects passed to
the animate command can be saved in PNG image format.
See www.imagemagick.org and www.ffmpeg.org for more information.
RichReprWarning,TurielTue, 22 May 2018 13:20:59 +0200https://ask.sagemath.org/question/42388/
- Windows 10: SageMath crashes on start with permission errors, but seems to work if I run "as administrator"https://ask.sagemath.org/question/41671/windows-10-sagemath-crashes-on-start-with-permission-errors-but-seems-to-work-if-i-run-as-administrator/I think I have a workaround, at least, but thought I'd post this in case there's something I can fix or if someone else comes across the same problem, because I couldn't find any mention of these errors myself.
I'm using the Windows installer 0.3 for SageMath 8.1. It appears to install without issues but when I initially opened it I got this sequence of messages:
/etc/profile: line 111: cd: /home/user: Permission denied
WARNING: Failed attempt to cd into /home/user!
mkdir: cannot create directory ‘/home/user/.sagemath-8.1’: Permission denied
cp: cannot create directory '/home/user/.sagemath-8.1': Permission denied
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.1, Release Date: 2017-12-07 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
mkdir: cannot create directory ‘/dot_sage’: Permission denied
/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/paths.py:69: UserWarning: IPython parent '/dot_sage' is not a writable location, using a temp directory.
" using a temp directory.".format(parent))
It goes on to say Sage crashed, and asks me to email in the crash report. When I tried opening the shell or Notebook I got similar errors.
Then while groping for something to try I right-clicked and ran "as an administrator" and everything appears to resolve.
I'm not the most savvy at high-level IT stuff but I thought this was strange, as I haven't had to use that feature with anything else I've installed, and there's no shortage of crap I've installed. There's only one account on my computer, there shouldn't be administrator permission issues.cretinsgaccountWed, 21 Mar 2018 12:59:32 +0100https://ask.sagemath.org/question/41671/