[sage-support] Re: CPLEX and SAGE
Thank you Dima I am a PhD student so I can get the free version, I can not download Cplex in virtualbox because I cant open browsers from virtualbox Thank On Monday, July 7, 2014 4:40:54 PM UTC+2, Mohammed hussein wrote: Dear All I downloaded sage in virtualbox after that I trying to download cplex. But I have problem of downloading cplex in a virtual box Any help please!! -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: CPLEX and SAGE
http://wiki.sagemath.org/SageAppliance On Tuesday, July 8, 2014 3:14:46 AM UTC-4, Mohammed hussein wrote: Thank you Dima I am a PhD student so I can get the free version, I can not download Cplex in virtualbox because I cant open browsers from virtualbox Thank On Monday, July 7, 2014 4:40:54 PM UTC+2, Mohammed hussein wrote: Dear All I downloaded sage in virtualbox after that I trying to download cplex. But I have problem of downloading cplex in a virtual box Any help please!! -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: wrong or nonexistent results for various infinite sums
sum(x^(3*k)/factorial(2*k),k,0,oo) I understand that Sage has limited exploitation of Maxima's hypergeometric functionality, and I suspect this is the main issue. Are there any conceivable workarounds? This actually works out of the box in the latest development release, probably with the same fix in #16224. sage: sum(x^(3*k)/factorial(2*k),k,0,oo) sqrt(pi)*x^(3/4)*sqrt(1/(pi*x^(3/2)))*cosh(x^(3/2)) sage: sum(x^(3*k)/factorial(2*k),k,0,oo).simplify_radical() cosh(x^(3/2)) -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Can't import sage into Python
I have a Django project with views.py: #!/usr/bin/env sage -python from django.shortcuts import render from django.http import HttpResponse import sys from django.http import HttpRequest from django.template import RequestContext, loaders sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/src/bin') sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/') from sage.all import * def index(request): querystring = request.GET.get('querystring') return HttpResponse(querystring) As you can see I am trying to import sage as a library into my Python document so I can do some sage computations. Unfortunately, when I fire up my Django server on localhost, I get: No module named sage.all As an error message. As you can see I have already tried appending to the path. My Python Path includes sage and I can see this on my Django page, however my PATH is PATH '/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin' According to the Django server output. I'm not sure if this could be the problem. Any help would be *greatly appreciated.* -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Weird! OverflowError: cannot convert float infinity to integer
On Tue, Jul 8, 2014 at 7:21 AM, David Hoo davidhoo471494...@gmail.com wrote: I happened to meet a overflow error, I install sage 6.2 both on a 64-bit macbook running MacOS 10.9 and 32-bit Dell Desktop running Ubuntu 12.04. The error message goes like this: OverflowError Traceback (most recent call last) ipython-input-7-8d411648858e in module() 1 get_ipython().magic(u'runfile DataCollecctionScript.py') /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s) 2163 magic_name, _, magic_arg_s = arg_s.partition(' ') 2164 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC) - 2165 return self.run_line_magic(magic_name, magic_arg_s) 2166 2167 #- /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line) 2084 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals 2085 with self.builtin_trap: - 2086 result = fn(*args,**kwargs) 2087 return result 2088 /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in runfile(self, s) /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/IPython/core/magic.pyc in lambda(f, *a, **k) 189 # but it's overkill for just that one bit of state. 190 def magic_deco(arg): -- 191 call = lambda f, *a, **k: f(*a, **k) 192 193 if callable(arg): /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in runfile(self, s) 108 2 109 -- 110 return self.shell.ex(preparser.load_wrap(s, attach=False)) 111 112 @line_magic /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in ex(self, cmd) 2437 Execute a normal python statement in user namespace. 2438 with self.builtin_trap: - 2439 exec cmd in self.user_global_ns, self.user_ns 2440 2441 def ev(self, expr): string in module() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/misc/preparser.pyc in load(filename, globals, attach) 1757 if fpath.endswith('.py'): 1758 exec_file_is(fpath) - 1759 execfile(fpath, globals) 1760 elif fpath.endswith('.sage'): 1761 from sage.misc.attached_files import load_attach_mode /Users/David/Desktop/src/DataCollecctionScript.py in module() 95 96 elif option == 'NiedereiterCryptosystem': --- 97 crypto = NiederreiterCryptosystem(n,m,irr_poly); 98 #Encrypt Decrypt 99 #Get m*t-bits random message weighing at most t and encrypt it. string in __init__(self, n, m, g) string in __init__(self, n, m, g) /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/matrix/matrix0.so in sage.matrix.matrix0.Matrix.__getitem__ (sage/matrix/matrix0.c:5871)() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2e_dense.so in sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense.get_unsafe (sage/matrix/matrix_mod2e_dense.c:4199)() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2e_dense.so in sage.matrix.matrix_mod2e_dense.word_to_poly (sage/matrix/matrix_mod2e_dense.c:3090)() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/finite_field_ntl_gf2e.pyc in fetch_int(self, number) 277 [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] 278 -- 279 return self._cache.fetch_int(number) 280 281 def polynomial(self, name=None): /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_ntl_gf2e.so in sage.rings.finite_rings.element_ntl_gf2e.Cache_ntl_gf2e.fetch_int (sage/rings/finite_rings/element_ntl_gf2e.cpp:6011)() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_ntl_gf2e.so in sage.rings.finite_rings.element_ntl_gf2e.Cache_ntl_gf2e.fetch_int (sage/rings/finite_rings/element_ntl_gf2e.cpp:5808)() /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/rings/real_double.so in sage.rings.real_double.RealDoubleElement.__int__
Re: [sage-support] find_root attribute error in Ubuntu 14.04
Hi, I have solved this myself. Turns out libgfortran3 library wasn't installed so I just did sudo apt-get install libgfortran3 Thanks for the help, Nishan On Tuesday, 8 July 2014 01:51:00 UTC-4, Jan Groenewald wrote: Hi I cannot reproduce this: sage: import numpy.core.numeric as NX sage: phi = var('phi') sage: find_root(cos(phi)==sin(phi),0,pi/2) 0.7853981633974484 sage: Maybe something is wrong with your installation? Regards, Jan On 8 July 2014 05:38, NahsiN nishan.s...@gmail.com javascript: wrote: Hello, I just downloaded the binary of Sage 6.2 for Ubuntu 14.04 64-bit. While going through the tutorial, find_root does not work. sage: phi = var('phi') sage: find_root(cos(phi)==sin(phi),0,pi/2) --- AttributeErrorTraceback (most recent call last) ipython-input-7-a4d72c0e34b9 in module() 1 find_root(cos(phi)==sin(phi),Integer(0),pi/Integer(2)) /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/sage/numerical/optimize.py in find_root(f, a, b, xtol, rtol, maxiter, full_output) 110 a = s 111 -- 112 import scipy.optimize 113 return scipy.optimize.brentq(f, a, b, 114 full_output=full_output, xtol=xtol, rtol=rtol, maxiter=maxiter) /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/scipy/__init__.py in module() 68 __all__ = ['test'] 69 --- 70 from numpy import show_config as show_numpy_config 71 if show_numpy_config is None: 72 raise ImportError(Cannot import scipy when running from numpy source directory.) /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/numpy/__init__.py in module() 135 return loader(*packages, **options) 136 -- 137 import add_newdocs 138 __all__ = ['add_newdocs'] 139 /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/numpy/add_newdocs.py in module() 7 # core/fromnumeric.py, core/defmatrix.py up-to-date. 8 9 from numpy.lib import add_newdoc 10 11 ### /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/numpy/lib/__init__.py in module() 11 12 import scimath as emath --- 13 from polynomial import * 14 #import convertcode 15 from utils import * /opt/sage-6.2-x86_64-Linux/local/lib/python2.7/site-packages/numpy/lib/polynomial.py in module() 9 import re 10 import warnings --- 11 import numpy.core.numeric as NX 12 13 from numpy.core import isscalar, abs, finfo, atleast_1d, hstack, dot AttributeError: 'module' object has no attribute 'core' sage: version() 'Sage Version 6.2, Release Date: 2014-05-06' Any ideas of what could be causing this error? -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com javascript:. To post to this group, send email to sage-s...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. -- .~. /V\ Jan Groenewald /( )\www.aims.ac.za ^^-^^ -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Can't import sage into Python
Anyone?? On Tuesday, July 8, 2014 2:53:33 PM UTC-4, Jole Bradbury wrote: I have a Django project with views.py: #!/usr/bin/env sage -python from django.shortcuts import render from django.http import HttpResponse import sys from django.http import HttpRequest from django.template import RequestContext, loaders sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/src/bin') sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/') from sage.all import * def index(request): querystring = request.GET.get('querystring') return HttpResponse(querystring) As you can see I am trying to import sage as a library into my Python document so I can do some sage computations. Unfortunately, when I fire up my Django server on localhost, I get: No module named sage.all As an error message. As you can see I have already tried appending to the path. My Python Path includes sage and I can see this on my Django page, however my PATH is PATH '/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin' According to the Django server output. I'm not sure if this could be the problem. Any help would be *greatly appreciated.* -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Can't import sage into Python
Anyone?? As you know, I've already had several useless ideas for you on another forum :( but here is another one. Is Sage itself in your regular path? By that I mean that in my PATH I have /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/usr/texbin:/Applications/MathApps: where the last one is where I have a symbolic link to my Sage installation. lrwxr-xr-x 1 me admin 87 Oct 10 2013 sage - /Users/.../Sage-5.12-OSX-64bit-10.6.app/Contents/Resources/sage/sage I was able to successfully do what you wanted, though, with a file #!/usr/bin/env sage -python from sage.all import * print permutations(5) Now, I just executed that file as a Unix file. When you are executing yours as a *Python* file, I get the same error as you. $ python views.py Traceback (most recent call last): File views.py, line 3, in module from sage.all import * ImportError: No module named sage.all Solution? I suppose either find a way to have Django execute it as a Unix file (not Python), or just run your entire project with sage -python instead of your system Python! Other people who actually know what they are talking about: please respond! On Tuesday, July 8, 2014 2:53:33 PM UTC-4, Jole Bradbury wrote: I have a Django project with views.py: #!/usr/bin/env sage -python from django.shortcuts import render from django.http import HttpResponse import sys from django.http import HttpRequest from django.template import RequestContext, loaders sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/src/bin') sys.path.append('/Users/Jole/Desktop/django_proj/mysite/sage/') from sage.all import * def index(request): querystring = request.GET.get('querystring') return HttpResponse(querystring) As you can see I am trying to import sage as a library into my Python document so I can do some sage computations. Unfortunately, when I fire up my Django server on localhost, I get: No module named sage.all As an error message. As you can see I have already tried appending to the path. My Python Path includes sage and I can see this on my Django page, however my PATH is PATH '/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin' According to the Django server output. I'm not sure if this could be the problem. Any help would be *greatly appreciated.* -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Can't import sage into Python
On Tuesday, July 8, 2014 10:40:26 PM UTC-4, kcrisman wrote: Anyone?? As you know, I've already had several useless ideas for you on another forum :( but here is another one. Is Sage itself in your regular path? By that I mean that in my PATH I have /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/usr/texbin:/Applications/MathApps: where the last one is where I have a symbolic link to my Sage installation. lrwxr-xr-x 1 me admin 87 Oct 10 2013 sage - /Users/.../Sage-5.12-OSX-64bit-10.6.app/Contents/Resources/sage/sage I was able to successfully do what you wanted, though, with a file #!/usr/bin/env sage -python from sage.all import * print permutations(5) Now, I just executed that file as a Unix file. When you are executing yours as a *Python* file, I get the same error as you. $ python views.py Traceback (most recent call last): File views.py, line 3, in module from sage.all import * ImportError: No module named sage.all Solution? I suppose either find a way to have Django execute it as a Unix file (not Python), or just run your entire project with sage -python instead of your system Python! And indeed, $ sage -python views.py views.py:4: DeprecationWarning: Use the Permutations object instead. See http://trac.sagemath.org/14772 for details. print permutations(5) [[1, 2, 3, 4, 5], [1, 2, 3, 5, 4], [1, 2, 4, 3, 5], [1, 2, 4, 5, 3], [1, 2, 5, 3, 4], [1, 2, 5, 4, 3], [1, 3, 2, 4, 5], [1, 3, 2, 5, 4], [1, 3, 4, 2, 5], [1, 3, 4, 5, 2], [1, 3, 5, 2, 4], [1, 3, 5, 4, 2], [1, 4, 2, 3, 5], [1, 4, 2, 5, 3], [1, 4, 3, 2, 5], [1, 4, 3, 5, 2], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 2, 3, 4], [1, 5, 2, 4, 3], [1, 5, 3, 2, 4], [1, 5, 3, 4, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2], [2, 1, 3, 4, 5], [2, 1, 3, 5, 4], [2, 1, 4, 3, 5], [2, 1, 4, 5, 3], [2, 1, 5, 3, 4], [2, 1, 5, 4, 3], [2, 3, 1, 4, 5], [2, 3, 1, 5, 4], [2, 3, 4, 1, 5], [2, 3, 4, 5, 1], [2, 3, 5, 1, 4], [2, 3, 5, 4, 1], [2, 4, 1, 3, 5], [2, 4, 1, 5, 3], [2, 4, 3, 1, 5], [2, 4, 3, 5, 1], [2, 4, 5, 1, 3], [2, 4, 5, 3, 1], [2, 5, 1, 3, 4], [2, 5, 1, 4, 3], [2, 5, 3, 1, 4], [2, 5, 3, 4, 1], [2, 5, 4, 1, 3], [2, 5, 4, 3, 1], [3, 1, 2, 4, 5], [3, 1, 2, 5, 4], [3, 1, 4, 2, 5], [3, 1, 4, 5, 2], [3, 1, 5, 2, 4], [3, 1, 5, 4, 2], [3, 2, 1, 4, 5], [3, 2, 1, 5, 4], [3, 2, 4, 1, 5], [3, 2, 4, 5, 1], [3, 2, 5, 1, 4], [3, 2, 5, 4, 1], [3, 4, 1, 2, 5], [3, 4, 1, 5, 2], [3, 4, 2, 1, 5], [3, 4, 2, 5, 1], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 5, 1, 2, 4], [3, 5, 1, 4, 2], [3, 5, 2, 1, 4], [3, 5, 2, 4, 1], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [4, 1, 2, 3, 5], [4, 1, 2, 5, 3], [4, 1, 3, 2, 5], [4, 1, 3, 5, 2], [4, 1, 5, 2, 3], [4, 1, 5, 3, 2], [4, 2, 1, 3, 5], [4, 2, 1, 5, 3], [4, 2, 3, 1, 5], [4, 2, 3, 5, 1], [4, 2, 5, 1, 3], [4, 2, 5, 3, 1], [4, 3, 1, 2, 5], [4, 3, 1, 5, 2], [4, 3, 2, 1, 5], [4, 3, 2, 5, 1], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 5, 1, 2, 3], [4, 5, 1, 3, 2], [4, 5, 2, 1, 3], [4, 5, 2, 3, 1], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [5, 1, 2, 3, 4], [5, 1, 2, 4, 3], [5, 1, 3, 2, 4], [5, 1, 3, 4, 2], [5, 1, 4, 2, 3], [5, 1, 4, 3, 2], [5, 2, 1, 3, 4], [5, 2, 1, 4, 3], [5, 2, 3, 1, 4], [5, 2, 3, 4, 1], [5, 2, 4, 1, 3], [5, 2, 4, 3, 1], [5, 3, 1, 2, 4], [5, 3, 1, 4, 2], [5, 3, 2, 1, 4], [5, 3, 2, 4, 1], [5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 4, 1, 2, 3], [5, 4, 1, 3, 2], [5, 4, 2, 1, 3], [5, 4, 2, 3, 1], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1]] Guess I need to get used to using Permutations instead of permutations. - kcrisman -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.