Ask Your Question
0

Using pyglet in sage?

asked 2013-02-10 05:59:47 +0100

Alasdair gravatar image

I'm experimenting with the Geometry package in sympy, but plotting seems to require pyglet:

from sympy import symbols, Plot  
from sympy.geometry import *   
c1 = Circle(Point(0,0),2)  
Plot(c1)  

ImportError: pyglet is required for plotting.  
  visit http://www.pyglet.org/

Now, as far as I know, pyglet is installed (via python), but it doesn't seem to be "visible" in Sage. I would rather use Sage than python/sympy, as I also need to perform some numerical and symbolic computations, as well as plotting the results.

So either I need to know how to get Sage to use pyglet, or get sympy.geometry to use another plotting tool.

Any advice? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-10 08:17:29 +0100

updated 2013-02-11 10:29:21 +0100

kcrisman gravatar image

Sage installs its own version of Python and many other mathematics packages independent of the host operating system. You would need to install pyglet in this environment. You can do this with

sage: !easy_install pyglet

on the Sage ipython prompt.

This was also answered here.

edit flag offensive delete link more

Comments

Well, it was answered about a different package, but yes.

kcrisman gravatar imagekcrisman ( 2013-02-11 10:29:41 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-10 05:59:47 +0100

Seen: 381 times

Last updated: Feb 11 '13