ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 26 Jun 2018 16:33:15 -0500plantri package not found and installing packageshttp://ask.sagemath.org/question/42746/plantri-package-not-found-and-installing-packages/ So I'm getting the plantri package not found error despite plantri appearing in my packages list in sage: pkgs=list_packages(local=True)
sorted(pkgs.keys())
sage: sorted(pkgs.keys())
...
'planarity',
'plantri',
'polymake',
...
Where do I download the plantri package?
Also I get a weird error from running
install_package?
Object `install_package` not found.
standardtrickynessTue, 26 Jun 2018 16:33:15 -0500http://ask.sagemath.org/question/42746/Add on other packageshttp://ask.sagemath.org/question/42129/add-on-other-packages/ I wanted to be able to use the python "uncertainties" package in the sage notebooks. I have sage installed on windows. The sage terminal said pip and easy_install did not have necessary permissions. In fact, the sage terminal itself did not have write access to the packages folder.
How do I install packages like 'uncertainties'?ionsmeSun, 22 Apr 2018 21:12:35 -0500http://ask.sagemath.org/question/42129/Making a simple GUI in Sagehttp://ask.sagemath.org/question/41285/making-a-simple-gui-in-sage/ I am currently in the process of writing a tool that performs a series of checks and then executes a very complicated algorithm. I would like to make a simple GUI as the plan is to offer the tool to anyone whom it might be of use to (free, of course). Unfortunately, I can't seem to find any documentation on creating a GUI in Sage. I also noticed that Sage does not have the popular Python packages for making a GUI.
Any help?
Thanks,
Adam ajmullinsTue, 27 Feb 2018 11:55:57 -0600http://ask.sagemath.org/question/41285/Installing package without recompiling sage from sourcehttp://ask.sagemath.org/question/38661/installing-package-without-recompiling-sage-from-source/ I installed the latest binary distribution (Sage 8.0) on Ubuntu 16.04. Then I tried to install an additional package using
sage -i gap_packages
Many hours later, the command is still running. It appears to be recompiling all of Sage from source (starting with GCC). Is this the expected behavior? Aren't there binary versions of the packages available?itorsicsFri, 25 Aug 2017 16:40:44 -0500http://ask.sagemath.org/question/38661/Should I / how should I make an optional sage package?http://ask.sagemath.org/question/38621/should-i-how-should-i-make-an-optional-sage-package/I've written some code in sage that implements the strata algebra of the moduli spaces of curves as a sage ring. I hope it will be useful to others. I think that a good way to share it would be to make it an optional, (or perhaps experimental?) sage package.
Is this a good thing to do?
If so, what are the steps?
My code is all in .sage files, but I could easily turn it into .py files if that is better.
paragonTue, 22 Aug 2017 15:49:01 -0500http://ask.sagemath.org/question/38621/Upgrade to latest versions of all packageshttp://ask.sagemath.org/question/38290/upgrade-to-latest-versions-of-all-packages/[Version 7.6, installed from source]
Is there a way to verify that all the latest versions of installed packages are the most recent stable versions?
What method is recommended to upgrade all installed packages?
rickhg12hsMon, 17 Jul 2017 17:03:08 -0500http://ask.sagemath.org/question/38290/Installing a package (using VirtualBox on Windows)http://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 -0500http://ask.sagemath.org/question/38177/What does `from sage.all import *` do?http://ask.sagemath.org/question/35483/what-does-from-sageall-import-do/This question is relatd with another one: [What packages in sage can I use in python?](http://ask.sagemath.org/question/35464/what-packages-in-sage-can-i-use-in-python/)
[How do I import Sage into a Python script](http://doc.sagemath.org/html/en/faq/faq-usage.html#how-do-i-import-sage-into-a-python-script) told me that to use from `sage.all import *` to import sage packages in python. When I list the installed sage packages, there is igraph and python-igraph. But `from sage.all import *` will not import them into python. I'd like to know, what kind of packages can be imported when I use `from sage.all import *`.
BTW, the proper way to use `igraph` in python is `import igraph` with `python_igraph`installed.
ps: My karma is insufficient to publish links.edenharderTue, 08 Nov 2016 12:38:49 -0600http://ask.sagemath.org/question/35483/Importing Python packages into Sage or Vice Versahttp://ask.sagemath.org/question/35457/importing-python-packages-into-sage-or-vice-versa/ Hi all,
this is my first post. I'm a long time user of Python, and I'm fairly new to Sage. I'm using Ubuntu, if this helps. Currently, python doesn't recognize any of Sage's packages, and Sage can't import even standard Python packages like pandas.
I've looked at various instructions online about how to import sage packages into python and vice versa, but they all seem incredibly intricate, and none of them seem to work for me.
Here are a few attempts that I made:
1. Running "sudo sagemath --python -m easy_install pandas" in terminal. (Still can't import pandas while running sage; even after running: "sys.path.append('/usr/lib/sagemath/local/lib/python2.7/site-packages/pandas-0.19.1-py2.7-linux-x86_64.egg')" from within sage.)
2. Following the instructions in the "import sage packages in python" question. (I don't have enough karma to post links.)
3. Doing various bizzarre attempts at changing sage_root or adding to it my python path.
4. Attempting to import pip while running sage, and install pandas this way. (Can't import pip.)
I tried a few more things (like downloading packages and "build"ing them, and then doing a few more very technical and annoying things), and all of my attempts fail. Is there really no simple way to do this? What is the most fool-proof way to do this that exists? It would be enormously helpful for me to be able to use python packages while working in sage, or vice versa.AndrewSun, 06 Nov 2016 09:34:37 -0600http://ask.sagemath.org/question/35457/Problems Installing TOPCOMhttp://ask.sagemath.org/question/30062/problems-installing-topcom/I am trying to install the package TOPCOM in Sage. I am running ubuntu 14.04.
Issuing
$ sage -i topcom
from my terminal returns
make: *** No rule to make target 'all-toolchain'. Stop.
Any ideas what is going wrong?
done_with_fishFri, 16 Oct 2015 12:07:42 -0500http://ask.sagemath.org/question/30062/Knot Theory and Sage?http://ask.sagemath.org/question/8255/knot-theory-and-sage/I was wondering what kind of Knot Theory tools Sage has? I've done a couple google searches, as well as a doc search in the Sage reference manual; everything's turned up bunk.
Does anyone know of any Knot Theory tools in sage? In particular, knot tables?
Thanks,
StevenStevenPollackTue, 02 Aug 2011 09:24:37 -0500http://ask.sagemath.org/question/8255/Installing igraphhttp://ask.sagemath.org/question/33651/installing-igraph/I'm trying to install the `python_igraph` package to Sage for use on my office computer, but the installation fails. I'm SSHing into a Mac machine.
I used`./sage -i python_igraph`. Everything looked fine until I get a lot of errors like
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:35:suffix or operands invalid for `movq'.
(The rest of the log is at the end of the post. Sorry for the length -- I wasn't able to attach a text file.)
Since this failed, I tried to find the `.spkg` file online to download it and install directly, but it doesn't appear to be among the packages on the Sage website. Can someone advise me about how to get access to the igraph capabilities?
Thanks.
Found local metadata for igraph-0.7.1
Using cached file /Users/username/SageMath/upstream/igraph-0.7.1.tar.gz
igraph-0.7.1
====================================================
Setting up build directory for igraph-0.7.1
Finished set up
****************************************************
Host system:
Darwin MacMal 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu- 3248.50.21~8/RELEASE_X86_64 x86_64
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Users/username/SageMath/local/libexec/gcc/x86_64-apple-darwin15.4.0/4.9.3/lto-wrapper
Target: x86_64-apple-darwin15.4.0
Configured with: ../src/configure --prefix=/Users/username/SageMath/local --with-local- prefix=/Users/username/SageMath/local --with-gmp=/Users/username/SageMath/local --with- mpfr=/Users/username/SageMath/local --with-mpc=/Users/username/SageMath/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --with-build-config=bootstrap-debug --without-isl --without-cloog
Thread model: posix
gcc version 4.9.3 (GCC)
****************************************************
[...]
GraphML format support -- yes
GMP library support -- yes
GLPK library support -- yes
Thread-local storage -- yes
Use internal ARPACK -- yes
Use internal LAPACK -- yes
Use internal BLAS -- yes
Use internal F2C -- yes
Use internal GLPK -- yes
Debug build -- no
Profiling -- no
make all-recursive
Making all in src
gcc -g -O2 -I/opt/local/include/libxml2 -DNO_FPINIT f2c/arithchk.c -lm -o f2c/arith || \
gcc -DNO_LONG_LONG -g -O2 -I/opt/local/include/libxml2 -DNO_FPINIT f2c/arithchk.c \
-Wall -lm -o f2c/arith
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:35:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:210:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:212:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:229:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccZdrX8V.s:231:suffix or operands invalid for `movq'
f2c/arithchk.c: In function 'need_nancheck':
f2c/arithchk.c:158:9: warning: variable 't' set but not used [-Wunused-but-set-variable]
double t;
^
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccSl8kbj.s:35:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccSl8kbj.s:219:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccSl8kbj.s:221:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccSl8kbj.s:238:suffix or operands invalid for `movq'
/var/folders/6x/c0q_xypx7fgc3qtsv2n3__gx740ldt/T//ccSl8kbj.s:240:suffix or operands invalid for `movq'
make[4]: *** [f2c/arith.h] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
Error building igraph.
real 0m17.917s
user 0m7.374s
sys 0m7.896s
************************************************************************
Error installing package igraph-0.7.1
************************************************************************
ec92Thu, 02 Jun 2016 13:57:49 -0500http://ask.sagemath.org/question/33651/sage-mode installationhttp://ask.sagemath.org/question/25859/sage-mode-installation/ I'm new to sage, and trying to set up sage_mode with emacs. As suggested <a href="http://wiki.sagemath.org/sage-mode">here</a>, I run "sage -i sage_mode" to install it. This gives the error message
mkdir: cannot create directory ‘’: No such file or directory
/usr/bin/sage: line 766: /usr/build/pipestatus: No such file or directory
Googling this doesn't seem to turn up anything relevant. Any suggestions? I'm running the build from the Arch Linux repos (64 bit).John LTue, 17 Feb 2015 14:07:30 -0600http://ask.sagemath.org/question/25859/How can I install a Sage package on Sage Cloud?http://ask.sagemath.org/question/24372/how-can-i-install-a-sage-package-on-sage-cloud/To install a sage package (e.g. the package "ore_algebra") from within a SMC project, I first tried running
install_package("ore_algebra")
but I got an error message that told me to do
sage -i ore_algebra
from the terminal instead. This I did and then got the error message
~$ sage -i ore_algebra
tee: /usr/local/sage/sage-6.3.beta6/logs/install.log: Permission denied
tee: /usr/local/sage/sage-6.3.beta6/logs/pkgs/ore_algebra.log: Permission denied
Attempting to download package ore_algebra
>>> Checking online list of optional packages.
[.]
>>> Found ore_algebra-0.1
Error: no write access to packages directory .
which is obvious since, I do not have write access to the global packages directory.
So the question becomes: How can I install Sage packages in the home directory of the current project on Sage Cloud?
Felix BreuerThu, 02 Oct 2014 07:16:20 -0500http://ask.sagemath.org/question/24372/Which packages optimize performance parameters during build?http://ask.sagemath.org/question/10837/which-packages-optimize-performance-parameters-during-build/Which packages use performance testing during the build process to optimize it? For example, I know NTL and Atlas do some testing to pick the best parameters for the platform. What other packages do this?
If I want to rebuild the performance testing packages during system "low-load" times, how should that be done? Like this? [*Edited to fix character case*]
$ ./sage -f ntl && ./sage -f atlas ... && ./sage -b
Are there dependencies? In what order should they be rebuilt?rickhg12hsTue, 17 Dec 2013 14:14:26 -0600http://ask.sagemath.org/question/10837/How can I install an R package in Sage Cloud?http://ask.sagemath.org/question/10835/how-can-i-install-an-r-package-in-sage-cloud/I want to use an specific R package in Sage Cloud but it is not installed there.
How can I install an R package in Sage Cloud?Rogerio PortoSun, 15 Dec 2013 12:32:32 -0600http://ask.sagemath.org/question/10835/Can't Install R Packages in Sagehttp://ask.sagemath.org/question/10023/cant-install-r-packages-in-sage/I'm running Sage 5.8 on Ubuntu 12.10 and am trying to install some R packages within Sage. However, when I enter
%r
install.packages("deSolve")
I get a green line and nothing happens. I am not asked what repository I'd like to use; when I specified a repository, I still got a green line and nothing happened. If I leave out the package name, I get a pop-up asking what package I want to install but nothing after that. What should I do?
jaiaSun, 14 Apr 2013 13:28:46 -0500http://ask.sagemath.org/question/10023/How to import 3rd party modules into SAGE?http://ask.sagemath.org/question/9754/how-to-import-3rd-party-modules-into-sage/In SAGE, I can import math or numpy from within a script, but I'm unable to import stuff located in, for example, /usr/lib/python2.7/dist-packages/. How could I fix that?
Thanks in advance.FaustoThu, 31 Jan 2013 00:38:17 -0600http://ask.sagemath.org/question/9754/import sage packages in pythonhttp://ask.sagemath.org/question/9302/import-sage-packages-in-python/An easy way to use sage in python files is demonstrated in the [Sage Tutorial](http://www.sagemath.org/doc/tutorial/programming.html).
#!/usr/bin/env sage -python
import sys
from sage.all import *
if len(sys.argv) != 2:
print "Usage: %s <n>"%sys.argv[0]
print "Outputs the prime factorization of n."
sys.exit(1)
print factor(sage_eval(sys.argv[1]))
Well, what if I don't want to import *all* of sage as shown above using:
from sage.all import *
Instead of this command above, I just want to import the following:
1. Matrix -> type 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'
2. vector -> type 'sage.modules.vector_integer_dense.Vector_integer_dense'
3. ZZ -> type 'sage.rings.integer_ring.IntegerRing_class'
4. MixedIntegerLinearProgram -> type 'sage.numerical.mip.MixedIntegerLinearProgram'
So I should be able to write something like this in python
from sage.library.package.for.Matrix import *
from sage.library.package.for.vector import *
from sage.library.package.for.ZZ import *
from sage.library.package.for.MixedIntegerLinearProgram import *
I just don't know what they are. Any help is appreciated.
Thanks.MaelstromYamatoThu, 06 Sep 2012 06:29:57 -0500http://ask.sagemath.org/question/9302/Structuring and naming moduleshttp://ask.sagemath.org/question/9219/structuring-and-naming-modules/I'm starting a new research project, and I'm confused about the best way to organize everything.
I'll need to write a few functions that compute invariants on Graphs, but the trick is that each function needs to call lots of smaller functions that compute bounds for the invariant, and then choose the min/max of these bounds and return it. I'd like the smaller functions to be "plug and play," so that other people on the project can come up with new bounds computers, drop them in the folder, and have them automatically used.
Currently, my file structure looks like this:
<pre>
project/
__init__.py
project.py
bounds/
__init__.py
boundcomputer1.py
boundcomputer2.py
...
</pre>
If I start a Sage session and <code>attach project.py</code>, the code seems to work correctly.
If I do <code>sage -t project.py</code>, it complains about not being able to find the <code>bounds</code> module.
Also, how do I get the functions in <code>project.py</code> to show up under a <code>project</code> namespace, so that I can type <code>project.compute_invariant()</code>, where <code>compute_invariant()</code> is a function defined inside <code>project.py</code>?
I'm happy to take any advice on best practice for a project like this.patronicsWed, 08 Aug 2012 10:17:21 -0500http://ask.sagemath.org/question/9219/Can't Access Functions After Install R Additional Packagehttp://ask.sagemath.org/question/9183/cant-access-functions-after-install-r-additional-package/Hi,
I'm trying to install an additional package for R, "SampleSizeMeans."
In the Notebook, I type r.install_packages('SampleSizeMeans') and it seems to install properly (output pasted below). Note I do this with "Sage" as the worksheet type at the top.
I've quit Sage completely and restarted the notebook, but none of the functions are available. I switch the Type in the Sage notebook to "R" and type "mu.acc(len=0.2, alpha=2, beta=2, n0=10)" (one of the examples) but it says "Error: could not find function "mu.acc".
Am I missing something or is this a bug?
Thanks very much,
Justin
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata
2528maxresident)k
0inputs+0outputs (0major+204minor)pagefaults 0swaps
R version 2.14.0 (2011-10-31)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> options(repos="http://cran.r-project.org/");
install.packages("SampleSizeMeans")
trying URL
'http://cran.r-project.org/src/contrib/SampleSizeMeans_1.0.tar.gz'
Content type 'application/x-gzip' length 14807 bytes (14 Kb)
opened URL
==================================================
downloaded 14 Kb
* installing *source* package SampleSizeMeans ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
* DONE (SampleSizeMeans)
The downloaded packages are in
/tmp/RtmpG4jlho/downloaded_packages
>
Please restart Sage in order to use 'SampleSizeMeans'.
Justin1Wed, 25 Jul 2012 14:07:20 -0500http://ask.sagemath.org/question/9183/Reinstall sage-mode after emacs upgradehttp://ask.sagemath.org/question/8761/reinstall-sage-mode-after-emacs-upgrade/Hi, I'm trying to reinstall sage mode after an upgrade of emacs (modules need to be byte-compiled with the new version of emacs).
sage -i sage-mode-0.6
tells me that it is already installed and does nothing.ThomasThu, 01 Mar 2012 02:04:07 -0600http://ask.sagemath.org/question/8761/Location of Sage packages?http://ask.sagemath.org/question/8221/location-of-sage-packages/Where does Sage store its Python packages?riemannTue, 12 Jul 2011 07:38:06 -0500http://ask.sagemath.org/question/8221/