From 594d000f92425e569c602c6eb837c2885dc41e2e 2018-12-06 19:09:13 From: Jake VanderPlas Date: 2018-12-06 19:09:13 Subject: [PATCH] print note about kernel restart after installing packages --- diff --git a/IPython/core/magics/packaging.py b/IPython/core/magics/packaging.py index fffb9d7..0f052b4 100644 --- a/IPython/core/magics/packaging.py +++ b/IPython/core/magics/packaging.py @@ -66,6 +66,7 @@ class PackagingMagics(Magics): %pip install [pkgs] """ self.shell.system(' '.join([sys.executable, '-m', 'pip', line])) + print("Note: you may need to restart the kernel to use updated packages.") @line_magic def conda(self, line): @@ -98,4 +99,5 @@ class PackagingMagics(Magics): if needs_prefix and not has_prefix: extra_args.extend(["--prefix", sys.prefix]) - self.shell.system(' '.join([conda, command] + extra_args + args)) \ No newline at end of file + self.shell.system(' '.join([conda, command] + extra_args + args)) + print("\nNote: you may need to restart the kernel to use updated packages.") \ No newline at end of file