[IPython-User] Pylab inline in windows virtualenv

MinRK benjaminrk@gmail....
Thu Aug 9 15:30:38 CDT 2012


Can you test:

pip install https://github.com/minrk/pyzmq/zipball/release

?

That has a workaround for the setuptools bug

-MinRK

On Thu, Aug 9, 2012 at 12:44 PM, MinRK <benjaminrk@gmail.com> wrote:

>
>
> On Thu, Aug 9, 2012 at 2:48 AM, Adam Davis <addavis@fosterandpartners.com>wrote:
>
>>
>>
>> ________________________________
>>
>> From: ipython-user-bounces@scipy.org
>> [mailto:ipython-user-bounces@scipy.org] On Behalf Of MinRK
>> Sent: 08 August 2012 20:25
>> To: Discussions about using IPython. http://ipython.org
>> Subject: Re: [IPython-User] Pylab inline in windows virtualenv
>>
>>
>> > 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.
>>
>> I realize I am swimming against the current trying to use pip on
>> Windows. The ability to share/deploy virtual environments via pip freeze
>> and pip install -r, as well as the ability to install packages from VCSs
>> are useful and I am trying to take advantage of these capabilities where
>> possible. This may not be one of those cases... Please see note about
>> Cython below.
>>
>>
>> On Wed, Aug 8, 2012 at 9:58 AM, Adam Davis
>> <addavis@fosterandpartners.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:
>>
>> >>
>> http://lists.ipython.scipy.org/pipermail/ipython-user/2012-July/010697.h
>> tml<http://lists.ipython.scipy.org/pipermail/ipython-user/2012-July/010697.html>
>> >>              ... 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 installed cython, also via pip. The requisite extensions for cython
>> were built with VS 2008 and the tests all pass.
>>
>> When I invoke pip install against the master zipball (as described in
>> the link above), Visual Studio seems to build the bundled zmq without
>> error and then fails as soon as it tries to compile zmq core. Cython
>> generated .c files are absent from the zmq directories (eg zmq/core). At
>> what point in the setup process should cython be invoked to generate
>> these files?
>>
>
> I've tracked this down to a setuptools bug.  If you are using setuptools
> (and not distribute), it manually converts .pyx filenames back to .c after
> incorrectly determining that Cython (specifically Pyrex) is not available.
>  I will add a workaround to pyzmq to prevent this stupidity, but this
> should not come up if you use distribute, which everybody should be doing
> anyway (especially on Windows).
>
> -MiNRK
>
>
>
>>
>> >>              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
>>
>>
>> > 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 accordingly.
>>
>>
>> > 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.
>>
>>
>>
>>         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<http://igotgenes.blogspot.co.uk/2010/01/interactive-sandboxes-using-ipython.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
>>
>>
>>
>>
>>         _______________________________________________
>>         IPython-User mailing list
>>         IPython-User@scipy.org
>>         http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>>
>>
>> _______________________________________________
>> 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/20120809/fd14fdb5/attachment-0001.html 


More information about the IPython-User mailing list