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.Fri, 17 Jun 2022 18:18:04 +0200Unable to install glucose SAT solver with Sagehttps://ask.sagemath.org/question/62870/unable-to-install-glucose-sat-solver-with-sage/ Hi all, I have sage 9.5 installed through anaconda. Following the instructions found on Sebastien Labbe's blog (can't post a link due to insufficient karma), I tried "sage -i glucose" to install glucose to no avail. The error message I got was:
"make: *** No rule to make target 'all-toolchain'. Stop."
I googled it and found other people with this problem, they were told to install sage a different way. So I installed version 9.6 via "brew install --cask sage" and then when I try "sage -i glucose" again I get:
"Sorry, this binary distribution does not support installing sage packages.
If glucose is available from pypi you may install it by running
%pip install glucose
from the sage prompt."
pip install glucose certainly doesn't work because it isn't a python package.
I looked up this error and found that perhaps I need to install from source in order to get the functionality for installing optional packages? So I downloaded the .tar.gz from the 3-manifolds GitHub repo and attempted to follow the instructions in the SETUP/readme files from there. Those seem to be outdated, as the instructions in them assume a directory structure that is not present in the form that I downloaded it. So, at this point I'm pretty stumped. I have combed myriad forum posts and tried lots of solutions but none of them worked. Does anyone have any tips/pointers? Many thanks.hhhultsFri, 17 Jun 2022 18:18:04 +0200https://ask.sagemath.org/question/62870/Error: unsupported operand type for ^ or pow(): 'list' and 'int' (Newbie)https://ask.sagemath.org/question/57728/error-unsupported-operand-type-for-or-pow-list-and-int-newbie/ Hi all,
I want to do a very simple thing: display an equation in Sage:
%display typeset
var('d, r, mu, c, g_1, g_2')
pi_m = [(1+d)*g_1 + r*(1-d*mu)-c*d^2]^(2)/(4*g_1) + [(1+d)*g_2 - c*d^2]^(2)/(4*g_2)
I receive the following error, which I understood is related to the fact that Python and Sage cannot elevate a list to the power of an integer:
TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'int'
Unfortunately, from the past answers I understood the problem, not the solution :D.
Can anyone help me? I imagine it's something immediate...
Boyko_BuThu, 24 Jun 2021 13:36:44 +0200https://ask.sagemath.org/question/57728/matplotlib.pyplot.ion() problemshttps://ask.sagemath.org/question/23749/matplotlibpyplotion-problems/Just updated to 6.2 sage version and I have troubles with above mentioned function.
After calling it every attempt to plot something [pyplot.plot(...)] results in appearing of empty plot that doesn't response to any interactions.
If I plot something in pyplot.ioff() mode and then call pyplot.show() - plot appears normally with everything plotted like it is supposed to.
Sage is installed via pacman (package manager) in arch linux os.
TkAgg is used as matplotlib backend.
All is done via console, NOT in notebook mode.
What can be the problem? gyroklimTue, 12 Aug 2014 14:17:51 +0200https://ask.sagemath.org/question/23749/Plotting in Ubuntu 12.10https://ask.sagemath.org/question/9488/plotting-in-ubuntu-1210/Hi. I just installed Ubuntu 12.10 in my computer and then installed sage for Ubuntu 12.04 (I am very new to both Linux and Sage). I can open Sage in my machine using the notebook interface, but, for one thing, it doesn't plot. I copied bellow what I get when I enter 'plot(x^2)'. Any help will be appreciated.
Thanks!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_10.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGxvdCh4XjIp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpOq5zzs/___code___.py", line 3, in <module>
exec compile(u'plot(x**_sage_const_2 )
File "", line 1, in <module>
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/misc/displayhook.py", line 176, in displayhook
print_obj(sys.stdout, obj)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/misc/displayhook.py", line 144, in print_obj
print >>out_stream, `obj`
File "sage_object.pyx", line 154, in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:1762)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 824, in _repr_
self.show()
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 456, in wrapper
return func(*args, **kwds)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 1735, in show
self.save(**kwds)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 456, in wrapper
return func(*args, **kwds)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 2584, in save
figure = self.matplotlib(**options)
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 2098, in matplotlib
from matplotlib.figure import Figure
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 133, in <module>
from matplotlib.rcsetup import (defaultParams,
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 19, in <module>
from matplotlib.colors import is_color_like
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/matplotlib/colors.py", line 52, in <module>
import numpy as np
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/numpy/__init__.py", line 136, in <module>
import add_newdocs
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module>
from polynomial import *
File "/home/rodrigo/Downloads/opt/sage-5.3/local/lib/python2.7/site-packages/numpy/lib/polynomial.py", line 11, in <module>
import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'anddradeWed, 31 Oct 2012 11:54:38 +0100https://ask.sagemath.org/question/9488/