Skip to content

Commit 0f32750

Browse files
authored
gh-148932: Docs / profiling.sampling Windows limitations (#150272)
1 parent 0851700 commit 0f32750

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/library/profiling.sampling.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ This requires one of:
387387
On Windows, the profiler requires administrative privileges or the
388388
``SeDebugPrivilege`` privilege to read another process's memory.
389389

390+
*Note*: On Windows, ``python -m profiling.sampling`` fails inside a virtual
391+
environment because the venv's ``python.exe`` is just a launcher shim that
392+
re-executes the base interpreter as a child process. The shim itself isn't
393+
a Python process and has no ``PyRuntime`` section to attach to. Instead,
394+
run it from the global Python installation.
390395

391396
Version compatibility
392397
---------------------

0 commit comments

Comments
 (0)