MCPcopy Index your code
hub / github.com/ipython/ipython / uv

Method uv

IPython/core/magics/packaging.py:167–181  ·  view source on GitHub ↗

Run the uv package manager within the current kernel. Usage: %uv pip install [pkgs]

(self, line)

Source from the content-addressed store, hash-verified

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.")

Callers

nothing calls this directly

Calls 1

systemMethod · 0.80

Tested by

no test coverage detected