Skip to content

Commit c3d21e5

Browse files
[3.15] gh-148932: Docs / profiling.sampling Windows limitations (GH-150272) (#150330)
gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272) (cherry picked from commit 0f32750) Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
1 parent 22c994c commit c3d21e5

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)