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.Sat, 13 Feb 2021 10:28:35 +0100Gurobi 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/How to set the matplotlib backend used by plot()https://ask.sagemath.org/question/53794/how-to-set-the-matplotlib-backend-used-by-plot/SageMath uses `matplotlib` as its graphics engine and the module itself can work with many backends. But how can I set a GUI matplotlib backend to be used by the `plot()` function and its friends, at least in the command-line interface? And is there a way to set a default backend?
In my setup, `plot()` doesn't respect the backend set by the `%matplotlib` magic, but `matplotlib.pyplot.plot()` does. Even worse, the default backend creates a PNG image file and opens it in the system's viewer.
I'm on macOS 10.13 "High Sierra" running SageMath 9.1, the binary app version.leogamaFri, 09 Oct 2020 01:50:44 +0200https://ask.sagemath.org/question/53794/Unable to get Show() with GTK backend inside Sagehttps://ask.sagemath.org/question/10909/unable-to-get-show-with-gtk-backend-inside-sage/I am trying to do the following with GTK as the sage backend.
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('Numbers')
plt.show()
I am able to do this inside Python with the following:
import matplotlib
matplotlib.use('GTK')
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('Numbers')
plt.show()
This fails in sage which asked me to install pygtk. When I did
sage: install_package('pygtk'),
it pulled an experimental pygtk-2.8.4 which failed with the following error
-----------------
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR configuring pygtk for build!
---------------------
I do have gcc/g++ installed in /usr/bin and in /usr/local/bin/sage/local/bin
All other backends like WX or PyQt4 run into other issues. I suspect this is a problem with the pygtk spkg. If someone has a workaround for this, please send/propose it.
RBSun, 12 Jan 2014 19:54:00 +0100https://ask.sagemath.org/question/10909/Tk development library for matplotlib backendhttps://ask.sagemath.org/question/9256/tk-development-library-for-matplotlib-backend/I am following the instructions at http://wiki.sagemath.org/sage_matlab to install the backend TkAgg for Sage's matplotlib. However, there is a missing step since the instructions assume that the Tk development libraries are already installed.
I am installing on a Red Hat Enterprise box behind a corporate firewall, so I am looking for a file to download with a name something like tk8.5-dev.tar. From there I can configure and make. I cannot find any such download on the web using Google or Bing. I can find downloads in the form of a .deb Debian package at [pkgs.org/download/tk8.5-dev](http://pkgs.org/download/tk8.5-dev) (which I believe is a binary file and so not usable on my system), but no source code tarball or rpm.
The answer to this question at [wiki.sagemath.org/faq](http://wiki.sagemath.org/faq) is specific to another flavor of Linux (use apt-get), which does me no good. Other questions on this site such as [ask.sagemath.org/question/816/how-to-use-tk-on-sage](http://ask.sagemath.org/question/816/how-to-use-tk-on-sage) just point back to the FAQ or the install page I referenced above.
Not trying to be nasty, but can I emphasize that solutions in the FAQ and the instructions should be as general as possible, and not only for one kind of system. All Linux varieties can work with tarballs. And please, I don't want to start a flame war on what's the best distro. Thanks.
burningbrightMon, 20 Aug 2012 18:01:12 +0200https://ask.sagemath.org/question/9256/