This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dstufft
Recipients BreamoreBoy, Marcus.Smith, Saimadhav.Heblikar, dstufft, ncoghlan, paul.moore, peter.otten, rhettinger, terry.reedy
Date 2015-09-05.20:46:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441486011.63.0.996081240509.issue23551@psf.upfronthosting.co.za>
In-reply-to
Content
pip doesn't really support being called as an API, there's been requests for it before but nobody has yet come forward to specify what parts in particular they need. The practical effect of this is that there's no backwards compatibility promises for anything you import from pip currently. I would suggest using a subprocess to communicate with pip unless you can define what operations you need so the pip developers can settle on a real public API for them.

As for your actual questions:

1. I'm pretty sure it requires restarting the process because pkg_resources has a cache and pip currently isn't designed in a way that it assumes you're going to freeze in anything but it's own process.

2. I think this depends on what version of of Python it's being used with and where the user installed it to. I think Steve Dower has switched Python 3.5's default install location to Program Files which does require it to be run as an administrator if you want to install into the site-packages instead of the user packages directory.
History
Date User Action Args
2015-09-05 20:46:51dstufftsetrecipients: + dstufft, rhettinger, terry.reedy, paul.moore, ncoghlan, peter.otten, BreamoreBoy, Marcus.Smith, Saimadhav.Heblikar
2015-09-05 20:46:51dstufftsetmessageid: <1441486011.63.0.996081240509.issue23551@psf.upfronthosting.co.za>
2015-09-05 20:46:51dstufftlinkissue23551 messages
2015-09-05 20:46:51dstufftcreate