Skip to content

Commit

Permalink
Backport PR ipython#13093: Fix ipython#13084
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMino authored and meeseeksmachine committed Aug 20, 2021
1 parent 9e13c7a commit 3bf52b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion IPython/core/magics/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ def pip(self, line):
Usage:
%pip install [pkgs]
"""
python = shlex.quote(sys.executable)
python = sys.executable
if sys.platform == "win32":
python = '"' + python + '"'
else:
python = shlex.quote(python)

self.shell.system(" ".join([python, "-m", "pip", line]))

print("Note: you may need to restart the kernel to use updated packages.")
Expand Down

0 comments on commit 3bf52b9

Please sign in to comment.