[IPython-User] Pylab inline in windows virtualenv
Wed Aug 8 14:24:39 CDT 2012
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.
On Wed, Aug 8, 2012 at 9:58 AM, Adam Davis <email@example.com>wrote:
> 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
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.
> . I was glad to see recent news of pyzmq-static and its inclusion in the
> pyzmq core here:
> ... 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
Building pyzmq from git requires Cython, do you have that installed? The
Cython-generated .c sources are only in packaged releases.
> 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
> from zmq.eventloop import stack_context
> ImportError: cannot import name stack_context
This is likely pyzmq-static not having pulled properly from upstream pyzmq,
and not a pyzmq issue.
> 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
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.
> *From:* firstname.lastname@example.org [mailto:
> email@example.com] *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
> 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.
> On Tue, Aug 7, 2012 at 4:30 AM, Thomas Kluyver **<firstname.lastname@example.org>**wrote:
>> On 7 August 2012 09:29, Adam Davis <email@example.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
>> > script in my IPython profile to append the appropriate directories to
>> > IPython's sys.path, using a modified version of the script shown here:
>> 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
>> You can also try installing IPython itself inside the virtualenv; then
>> it should work properly without needing any special tricks.
>> IPython-User mailing list
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User