[IPython-User] Pylab inline in windows virtualenv

Adam Davis addavis@fosterandpartners....
Wed Aug 8 11:58:02 CDT 2012


I am trying to wind my way back to why I chose to install IPython in the
system's site-packages and it comes down to pyzmq. The binary installer
for pyzmq works fine if I want to put pyzmq in site-packages of the
interpreter in the registry. I was glad to see recent news of
pyzmq-static and its inclusion in the pyzmq core here:
 
http://lists.ipython.scipy.org/pipermail/ipython-user/2012-July/010697.h
tml
 
... as I thought that might get me further toward being able to have an
IPython environment with zmq, installed in an isolated venv via pip.
However, I've just tried both the recommendation at the url above, which
fails when trying to build:
 
c1 : fatal error C1083: Cannot open source file: 'zmq\core\_poll.c': No
such file or directory
 
I can do:
 
    pip install pyzmq-static
 
... and it will complete succesfully, but trying to run:
 
    ipython notebook
 
... I get the error:

  File "...\lib\site-packages\zmq\eventloop\ioloop.py", line 48, in
<module>
    from zmq.eventloop import stack_context
ImportError: cannot import name stack_context
 
I have a feeling that either of both of these issues may be more
appropriate to report on the pyzmq mailing list and/or Issues tracker on
github. If you can advise how best to flag these up, I will try to do so
accordingly.
 
Thanks,
 
Adam
 

________________________________

From: ipython-user-bounces@scipy.org
[mailto:ipython-user-bounces@scipy.org] On Behalf Of MinRK
Sent: 07 August 2012 17:54
To: Discussions about using IPython. http://ipython.org
Subject: Re: [IPython-User] Pylab inline in windows virtualenv


Did you set up your venv with `--system-site-packages`?  If not, IPython
*shouldn't* work, because it's not installed with the Python you want to
be using. 

If you want IPython to be available in an isolated (default) virtualenv,
it is always best to install IPython to the env itself, just like you
did with matplotlib.  IPython is *not* special in this regard - treat it
like any other Python package not in the stdlib.  There are absolutely
no workarounds or trickery necessary to make this work: Install IPython
in the env, and everything works exactly as expected.

-MinRK


On Tue, Aug 7, 2012 at 4:30 AM, Thomas Kluyver <takowl@gmail.com> wrote:


	On 7 August 2012 09:29, Adam Davis
<addavis@fosterandpartners.com> wrote:
	> From within a virtual_env on Windows 7. Previously, I was
having trouble
	> with IPython 'recognizing' the virtual_env -- it was starting
from the
	> virtualenv's interpreter but not including the virtual_env's
PYTHONPATH
	> directories in sys.path. I worked around this issue by
including a startup
	> script in my IPython profile to append the appropriate
directories to
	> IPython's sys.path, using a modified version of the script
shown here:
	>
	>
http://igotgenes.blogspot.co.uk/2010/01/interactive-sandboxes-using-ipyt
hon.html
	
	
	Have you tried with the latest version of IPython (0.13)? We've
now
	included a version of that script in IPython itself, so it might
work
	better.
	
	You can also try installing IPython itself inside the
virtualenv; then
	it should work properly without needing any special tricks.
	
	Thomas
	_______________________________________________
	IPython-User mailing list
	IPython-User@scipy.org
	http://mail.scipy.org/mailman/listinfo/ipython-user
	


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120808/f438a16a/attachment.html 


More information about the IPython-User mailing list