New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a routine to refresh the working set #373
Comments
Original comment by stonebig (Bitbucket: stonebig, GitHub: stonebig): This doesn't work (on Python 3.4 / pip 0.6.8 / setuptools 15.1, at least )
I'm forced to do this ugly thing, which creates a totally different python process:
(and which, I fear, may not work on a korean Windows PC computer using Python 2.7) Maybe, without fixing the issue, there is another way not implying reading a DOS output |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): What if you invoke |
Original comment by stonebig (Bitbucket: stonebig, GitHub: stonebig): I have only one distribution directory in the path (no virtualenv). I add/remove packages via a sup-process after start-up, like:
|
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): @stonebig What do you make of my last suggestion? Did you try it?
Do you see a difference after installing the package out-of-band? |
Original comment by stonebig (Bitbucket: stonebig, GitHub: stonebig): indeed, at the same place in code
But then there is the is_local() test to re-implement, not a one liner. I whish a simpler option could be added in pip. |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): The 15.2 release has this functionality, but it is exposed provisionally. In fact, it's currently presented as a private function (with a leading underscore). Feel free to try it out. Because it has potentially broad effects to refresh the working set of a running environment, it may not work in all cases (such as when sys.path has changed or when sys.path hasn't been changed for relevant changes). However, for the use-case you've described, I believe you need only now invoke |
Originally reported by: stonebig (Bitbucket: stonebig, GitHub: stonebig)
Hi,
I'm using this to get list of current package.
Unfortunately:
.refresh()
rbtcollins pointed me to
pkg_resources
API, here, but the document is obscure for me.Could you spare a few minutes to give me an example on how to obtain the wished effect ?
see pypa/pip#2695 (comment)
The text was updated successfully, but these errors were encountered: