new-coder icon indicating copy to clipboard operation
new-coder copied to clipboard

not able to draw matplotlib graph

Open econchick opened this issue 12 years ago • 1 comments

re: http://newcoder.io/Part-2-Graph

Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2

OS: Ubuntu 12.10

Packages in virtualenv: pip freeze argparse==1.2.1 ipython==0.13.1 matplotlib==1.2.0 numpy==1.7.0 wsgiref==0.1.2

works w/o virtualenv activated - weird.

econchick avatar Mar 26 '13 03:03 econchick

I had this problem too. I believe that it is due to the Ubuntu build of python not including tk-dev, which has _tkagg (see http://stackoverflow.com/questions/15708226/python3-3-matplotlib-cannot-import-name-tkagg for more info). If you use apt to build it, it gets included, but I don't know how in a virtualenv. I eventually gave up trying to get the tkinter version working in a virtualenv, and used pygtk (which wasn't easy, but that is another story...).

theepdinker avatar May 21 '13 02:05 theepdinker