Skip to content

Commit 2f5aac7

Browse files
committed
docs: document bad shebangs in Python scripts
1 parent ca2893e commit 2f5aac7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/quirks.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44
Behavior Quirks
55
===============
66

7+
Bad Shebangs in Python Scripts
8+
==============================
9+
10+
Various Python scripts under ``install/bin/`` (e.g. ``pip``) have
11+
shebangs looking like ``#!/build/out/python/install/bin/python3``.
12+
This ``/build/out/`` directory is where the distribution is built
13+
from. Python is writing out shebangs for Python scripts with
14+
that absolute path.
15+
16+
To work around this issue, you can mass rewrite the shebangs to
17+
point the directory where the distribution is extracted/installed
18+
to.
19+
20+
Alternatively, you can sometimes execute ``python3 -m <module>``
21+
to get equivalent functionality to what the installed script would
22+
do. e.g. to run pip, ``python3 -m pip ...``.
23+
724
Backscape Key Doesn't work in Python REPL
825
=========================================
926

0 commit comments

Comments
 (0)