Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
matplotlib, ipython and virtualenv
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vid  
View profile  
 More options Nov 13 2012, 6:17 pm
From: Vid <svak...@gmail.com>
Date: Tue, 13 Nov 2012 18:17:35 -0500
Local: Tues, Nov 13 2012 6:17 pm
Subject: matplotlib, ipython and virtualenv
Hi,

I have been trying to use matplotlib inside a virtualenv along with
ipython, numpy, etc all of which are installed. Fwiw, I used pip to
install matplotlib inside the VENV and it did but when I invoke
ipython in the virtualenv and try the following

In [2]: %pylab
Welcome to pylab, a matplotlib-based Python environment [backend: agg].
For more information, type 'help(pylab)'.

In [9]: plot(range(50), [x ** 2 for x in range(50)], '--')
Out[9]: [<matplotlib.lines.Line2D at 0xaf57bcc>]

The plot command is supposed to display a graph but it does not. Does
"[backend: agg]" mean there are matplotlib dependencies that are not
installed. Fwiw, matplotlib is installed system-wide and the above
works there (outside the Env). The system details are: Ubuntu-12.04
using IPython 0.13.1

On IRC, someone suggested I use the  "--system-site-packages" argument
while invoking the Env but I find that this argument does not create a
virtualenv environment at all. Example: Instead of "
(testEnv)m...@Ubuntu12.04:~/Envs/testEnv/dwf$ ", it shows "
m...@Ubuntu12.04:~/Envs/testEnv/dwf$ "

Any pointers?
Thanks in Advance.
--
Regards,
Vid  ॥ http://svaksha.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vid  
View profile  
 More options Nov 14 2012, 4:12 pm
From: Vid <svak...@gmail.com>
Date: Wed, 14 Nov 2012 16:12:34 -0500
Local: Wed, Nov 14 2012 4:12 pm
Subject: Re: matplotlib, ipython and virtualenv

On Tue, Nov 13, 2012 at 6:17 PM, Vid <svak...@gmail.com> wrote:
> Hi,

> I have been trying to use matplotlib inside a virtualenv along with
> ipython, numpy, etc all of which are installed. Fwiw, I used pip to
> install matplotlib inside the VENV and it did but when I invoke
> ipython in the virtualenv and try the following

> In [2]: %pylab
> Welcome to pylab, a matplotlib-based Python environment [backend: agg].
> For more information, type 'help(pylab)'.

> In [9]: plot(range(50), [x ** 2 for x in range(50)], '--')
> Out[9]: [<matplotlib.lines.Line2D at 0xaf57bcc>]

Apparently, terminal IPython needs a real GUI to draw plots, but
matplotlib hasn't implemented ascii art inline plots, so since I want
a fully isolated env, I tried to install all of the bindings for GUI
toolkits (pyqt and pygtk) in the env, which failed as below:

$ pip install pygtk
Downloading/unpacking pygtk
  Downloading pygtk-2.24.0.tar.bz2 (2.4Mb): 2.4Mb downloaded
  Running setup.py egg_info for package pygtk
    ********************************************************************
    * Building PyGTK using distutils is only supported on windows. *
    * To build PyGTK in a supported way, read the INSTALL file.    *
    ********************************************************************
    Complete output from command python setup.py egg_info:
    ********************************************************************

* Building PyGTK using distutils is only supported on windows. *

* To build PyGTK in a supported way, read the INSTALL file.    *

********************************************************************

</error message>

Any thoughts?
TIA
--
Regards,
Vid  ॥ http://svaksha.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Lambacher  
View profile  
 More options Nov 14 2012, 4:52 pm
From: Chris Lambacher <ch...@kateandchris.net>
Date: Wed, 14 Nov 2012 16:52:16 -0500
Local: Wed, Nov 14 2012 4:52 pm
Subject: Re: [venv] matplotlib, ipython and virtualenv

Hi,

PyGTK is not pip installable. Have you read the INSTALL file that comes in
the PyGTK source?

Also, I wasn't aware that iPython had a GTK version. It does have a Qt
based version that works with PySide or PyQT; though I'm unsure of the pip
installability of those. iPython notebook will run in your browser and give
you the same things without the need to build challenging c extensions.

-Chris

--
Christopher Lambacher
ch...@kateandchris.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vid  
View profile  
 More options Nov 14 2012, 5:58 pm
From: Vid <svak...@gmail.com>
Date: Wed, 14 Nov 2012 17:58:37 -0500
Local: Wed, Nov 14 2012 5:58 pm
Subject: Re: [venv] matplotlib, ipython and virtualenv

On Wed, Nov 14, 2012 at 4:52 PM, Chris Lambacher <ch...@kateandchris.net> wrote:
> Hi,

> PyGTK is not pip installable. Have you read the INSTALL file that comes in
> the PyGTK source?

> Also, I wasn't aware that iPython had a GTK version. It does have a Qt based
> version that works with PySide or PyQT; though I'm unsure of the pip
> installability of those. iPython notebook will run in your browser and give
> you the same things without the need to build challenging c extensions.

Matplotlib works fine outside the env but then, what is the point of
having an env if I am going to run development code system-wide? I'm
not too happy about building C extensions or struggling with
dependency issues either, but its a problem I cannot solve until
inline plot support for the env is implemented.

Meanwhile, I am trying to find a way to get matplotlib to render
graphs when I test code inside the Env. Atm, I have to ask it to use
the system-wide packages (which disables the Env).

Regards,
Vid  ॥ http://svaksha.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Lambacher  
View profile  
 More options Nov 15 2012, 1:17 pm
From: Chris Lambacher <ch...@kateandchris.net>
Date: Thu, 15 Nov 2012 13:17:08 -0500
Local: Thurs, Nov 15 2012 1:17 pm
Subject: Re: [venv] matplotlib, ipython and virtualenv

Hi Vid,

The easy way is to symlink the system version of the python lib into your
virtualenv site-packages directory. That way you can use package management
to get some hard to install libraries installed and still maintain
isolation. An example of a script that does this is here:
http://stackoverflow.com/a/9716100/108518  That script uses
virtualenvwrapper, but you could easily create a generic version of the
script. Also has a utility function to add directories to a virtualenv path
for this purpose:
http://virtualenvwrapper.readthedocs.org/en/latest/command_ref.html#a...

-Chris

--
Christopher Lambacher
ch...@kateandchris.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »