We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1451544 + bf9303a commit 02545e9Copy full SHA for 02545e9
IPython/core/magics/packaging.py
@@ -162,3 +162,20 @@ def micromamba(self, line):
162
"""
163
micromamba = _get_conda_like_executable("micromamba")
164
self._run_command(micromamba, line)
165
+
166
+ @line_magic
167
+ def uv(self, line):
168
+ """Run the uv package manager within the current kernel.
169
170
+ Usage:
171
+ %uv pip install [pkgs]
172
+ """
173
+ python = sys.executable
174
+ if sys.platform == "win32":
175
+ python = '"' + python + '"'
176
+ else:
177
+ python = shlex.quote(python)
178
179
+ self.shell.system(" ".join([python, "-m", "uv", line]))
180
181
+ print("Note: you may need to restart the kernel to use updated packages.")
0 commit comments