Show More
@@ -12,7 +12,7 b' import re' | |||||
12 | import shlex |
|
12 | import shlex | |
13 | import sys |
|
13 | import sys | |
14 | from pathlib import Path |
|
14 | from pathlib import Path | |
15 |
|
15 | from multiprocessing import list2cmdline | ||
16 | from IPython.core.magic import Magics, magics_class, line_magic |
|
16 | from IPython.core.magic import Magics, magics_class, line_magic | |
17 |
|
17 | |||
18 |
|
18 | |||
@@ -66,8 +66,7 b' class PackagingMagics(Magics):' | |||||
66 | Usage: |
|
66 | Usage: | |
67 | %pip install [pkgs] |
|
67 | %pip install [pkgs] | |
68 | """ |
|
68 | """ | |
69 | python = shlex.quote(sys.executable) |
|
69 | self.shell.system(list2cmdline([sys.executable, "-m", "pip"]) + " " + line) | |
70 | self.shell.system(" ".join([python, "-m", "pip", line])) |
|
|||
71 |
|
70 | |||
72 | print("Note: you may need to restart the kernel to use updated packages.") |
|
71 | print("Note: you may need to restart the kernel to use updated packages.") | |
73 |
|
72 |
General Comments 0
You need to be logged in to leave comments.
Login now