[Python-ideas] install pip packages from Python prompt

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Oct 30 13:25:53 EDT 2017

On Mon, Oct 30, 2017 at 11:44 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> 3. We can't replicate it as readily in the regular REPL, since that runs
> Python code directly in the current process, but even there I believe we
> could potentially trigger a full process restart via execve (or the C++
> style _execve on Windows)

This exact problem is solved rather elegantly in Julia.  When you
upgrade a package that is already loaded in the REPL, it prints a

"The following packages have been updated but were already imported:
... Restart Julia to use the updated versions."

listing the affected packages.

See <https://github.com/JuliaLang/julia/blob/19921aa00468edf11f3d61f8c9b8d639ec71cd23/base/pkg/entry.jl#L564>.

More information about the Python-ideas mailing list