Issue with Plot function

68 views
Skip to first unread message

Kundan Kumar

unread,
Mar 1, 2014, 12:38:49 AM3/1/14
to sy...@googlegroups.com
I am trying to use Plot function of sympy but it is giving error displaying "ImportError: pyglet is required for plotting"

I googled the problem and the suggestion was to change a "except to except Importerror" but its already Importerror.

But still its not working. Any suggestion why its not working.

SAHIL SHEKHAWAT

unread,
Mar 1, 2014, 5:30:35 AM3/1/14
to sy...@googlegroups.com
You first need to install pyglet by running  $ sudo apt-get install python-pyglet
Message has been deleted

Bharath M R

unread,
Mar 1, 2014, 5:46:28 AM3/1/14
to sy...@googlegroups.com
The new plotting module uses matplotlib. You can have a look at the documentation

Kundan Kumar

unread,
Mar 1, 2014, 6:02:08 AM3/1/14
to sy...@googlegroups.com
Thanks Sahil, it worked.
But did sympy not contain pyglet implicitly.

Kundan Kumar

unread,
Mar 1, 2014, 6:21:19 AM3/1/14
to sy...@googlegroups.com
Thanks Bharath,
Do I have to install matplotlib library explicitly.

SAHIL SHEKHAWAT

unread,
Mar 1, 2014, 6:47:29 AM3/1/14
to sy...@googlegroups.com
yes! indeed you have to install the necessary libraries for the sympy dependencies. Sympy does not contain these libraries on its own, Sympy is itself a library.


On Saturday, March 1, 2014 11:08:49 AM UTC+5:30, Kundan Kumar wrote:

Aaron Meurer

unread,
Mar 1, 2014, 3:16:15 PM3/1/14
to sy...@googlegroups.com
SymPy used to ship a copy of pyglet, but we stopped doing it, since it
can be installed separately, and the pyglet plotting is not the best
plotting anyway (you should prefer the new plotting module with
plot(), rather than Plot()).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/c97c10c2-4e5d-4aa6-b7d1-78e0e19b8ff1%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages