Your mistake is that you arre using pip on Windows. Use `easy_install pyzmq` instead, and it should happily drop the pyzmq egg into your venv.<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 9:58 AM, Adam Davis <span dir="ltr"><<a href="mailto:addavis@fosterandpartners.com" target="_blank">addavis@fosterandpartners.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">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</font></span></div></div></blockquote><div><br></div><div>easy_install pyzmq will use the binary egg, and should work just fine in the env. pip deliberately (and to the detriment of many users) ignores eggs. For this reason, I would not recommend pip for extension modules to any Windows user.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">. I was glad to see recent news of pyzmq-static and
its inclusion in the pyzmq core here:</font></span></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><a href="http://lists.ipython.scipy.org/pipermail/ipython-user/2012-July/010697.html" target="_blank">http://lists.ipython.scipy.org/pipermail/ipython-user/2012-July/010697.html</a></font></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">... 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:</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">c1 :
fatal error C1083: Cannot open source file: 'zmq\core\_poll.c': No such file or
directory</font></span></div></div></blockquote><div><br></div><div>Building pyzmq from git requires Cython, do you have that installed? The Cython-generated .c sources are only in packaged releases.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">I can
do:</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial"> pip install pyzmq-static</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">...
and it will complete succesfully, but trying to run:</font></span></div>
<div><span></span> </div>
<div><span> <font color="#0000ff" face="Arial">ipython notebook</font></span></div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><span><font color="#0000ff" face="Arial">... I
get the error:</font></span></div>
<div><span><font color="#0000ff" face="Arial"><br> File "...\lib\site-packages\zmq\eventloop\ioloop.py", line
48, in <module><br> from zmq.eventloop import
stack_context<br>ImportError: cannot import name
stack_context</font></span></div></div></blockquote><div><br></div><div>This is likely pyzmq-static not having pulled properly from upstream pyzmq, and not a pyzmq issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div><span><font color="#0000ff" face="Arial"></font></span> </div>
<div><font color="#0000ff" face="Arial"><span>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.</span></font></div></div></blockquote><div><br></div><div>If anything should be reported to pyzmq, it's that the error message when you try to build from git without Cython should be clearer.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div> </div>
<div><font color="#0000ff" face="Arial"><span>Thanks,</span></font></div>
<div><font color="#0000ff" face="Arial"><span></span></font> </div>
<div><font color="#0000ff" face="Arial"><span>Adam</span></font></div>
<div><font color="#0000ff" face="Arial"></font> </div>
<div><br></div>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font face="Tahoma"><b>From:</b> <a href="mailto:ipython-user-bounces@scipy.org" target="_blank">ipython-user-bounces@scipy.org</a>
[mailto:<a href="mailto:ipython-user-bounces@scipy.org" target="_blank">ipython-user-bounces@scipy.org</a>] <b>On Behalf Of
</b>MinRK<br><b>Sent:</b> 07 August 2012 17:54<br><b>To:</b> Discussions about
using IPython. <a href="http://ipython.org" target="_blank">http://ipython.org</a><br><b>Subject:</b> Re: [IPython-User] Pylab
inline in windows virtualenv<br></font><br></div><div><div class="h5">
<div></div>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.
<div><br></div>
<div>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.</div>
<div><br></div>
<div>-MinRK<br>
<div><br>
<div class="gmail_quote">On Tue, Aug 7, 2012 at 4:30 AM, Thomas Kluyver
<u></u><<a href="mailto:takowl@gmail.com" target="_blank">takowl@gmail.com</a>><u></u> wrote:<br>
<blockquote class="gmail_quote">
<div>On 7 August 2012 09:29, Adam Davis <<a href="mailto:addavis@fosterandpartners.com" target="_blank">addavis@fosterandpartners.com</a>>
wrote:<br>> From within a virtual_env on Windows 7. Previously, I was
having trouble<br>> with IPython 'recognizing' the virtual_env -- it was
starting from the<br>> virtualenv's interpreter but not including the
virtual_env's PYTHONPATH<br>> directories in sys.path. I worked around this
issue by including a startup<br>> script in my IPython profile to append
the appropriate directories to<br>> IPython's sys.path, using a modified
version of the script shown here:<br>><br>> <a href="http://igotgenes.blogspot.co.uk/2010/01/interactive-sandboxes-using-ipython.html" target="_blank">http://igotgenes.blogspot.co.uk/2010/01/interactive-sandboxes-using-ipython.html</a><br>
<br></div>Have
you tried with the latest version of IPython (0.13)? We've now<br>included a
version of that script in IPython itself, so it might
work<br>better.<br><br>You can also try installing IPython itself inside the
virtualenv; then<br>it should work properly without needing any special
tricks.<br><br>Thomas<br>_______________________________________________<br>IPython-User
mailing list<br><a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a><br><a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</blockquote></div><br></div></div></div></div></div>
<br>_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br></blockquote></div><br>