On November 9, 2015 at 8:26:50 AM, Paul Moore (p.f.mo...@gmail.com) wrote: > On 9 November 2015 at 12:46, Wayne Werner wrote: > > My experience(s) with the latest IPython is that it's freaking magic - in > > a good way :) > > Nice :-) Maybe pip could learn something useful from how the IPython > guys do that. > Paul
It’s not likely to be a great option. It essentially just takes /usr/bin/ipython and if the ``VIRTUAL_ENV`` variable is defined it munges sys.path so that it also adds the ``site-packages`` from the virtual environment. This means that it totally ignores —no-site-packages because the “outside” Python sys.path is still there. The ``-p`` flag in my PoC works by munging the sys.path, but the difference is that it’s adding something like /usr/bin/pip to the sys.path (which is a zip file) which doesn’t otherwise pollute the sys.path with other random crap from within the site-packages. It’d be trivial to have the ``-p`` flag default to something that just automatically takes into account a virtual environment though and python -m pip would implicitly automatically take a virtual environment into account. ----------------- Donald Stufft PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig