System Servicespythonsymlinkcompatibilitydevelopmentinterpreter

what-is-python

Collection of Python compatibility packages that provide symlinks for unversioned python, python-config, and development tools to point to Python 3. Facilitates compatibility with third-party code expecting traditional unversioned Python binaries.

Description

Starting with Debian 11 (bullseye) and Ubuntu 20.04 LTS (focal), Python packages use explicit python3 or python2 interpreters, avoiding unversioned /usr/bin/python or /usr/bin/python-config. However, some third-party code still relies on these unversioned paths. The what-is-python tools address this by providing convenience packages: python-is-python3 symlinks /usr/bin/python to python3, python-dev-is-python3 symlinks /usr/bin/python-config to python3-config, improving compatibility with modern systems while potentially affecting obsolete software.

These packages include associated Python tools like pdb (Python debugger), pydoc (documentation tool), python-config (build options for C/C++ extensions), and the python interpreter itself. No packages should declare dependencies on these, as they are transitional aids. Installed sizes are minimal: 16 KB for python-is-python3 and 13 KB for python-dev-is-python3.

Use cases include setting up environments for legacy Python scripts or third-party applications in Kali Linux that expect /usr/bin/python without specifying the version, ensuring they run with the default Python 3.

How It Works

These are metapackages creating symlinks: python-is-python3 links /usr/bin/python to /usr/bin/python3 interpreter; python-dev-is-python3 links /usr/bin/python-config to /usr/bin/python3-config. They depend on python3, python3-dev respectively. Associated tools operate as standard Python utilities: pdb debugs programs via command-line interface reading .pdbrc files; pydoc generates documentation or serves HTTP docs; python-config outputs compiler/linker flags (--prefix, --includes, etc.); python runs scripts interactively or via flags like -c, -m.

Installation

bash
sudo apt install python-dev-is-python3

Flags

-hShow help message and exit (pdb, pydoc, python, python-config)
-cpdb: commands to execute as if in .pdbrc; python: program passed as string
-mpdb/python: specify module to debug/run
-kpydoc: Search for a keyword in synopsis lines of modules
-ppydoc: Start HTTP server on given port
-bpydoc: Start HTTP server and open browser
-wpydoc: Write HTML documentation to file
--prefixpython-config: Output prefix directory
-ipython: Inspect interactively after running script
-Vpython: Print Python version and exit

Examples

Show pdb usage help
pdb -h
Let script run until exception occurs
pdb -c continue
Let script run up to line X
pdb -c 'until X'
Show pydoc help
pydoc -h
Search for keyword in module synopses
pydoc -k <keyword>
Start HTTP server on specified port
pydoc -p <port>
Start server and open browser for docs
pydoc -b
Show python-config usage
python-config --help
Show python usage help
python -h
Execute Python code string
python -c 'print("Hello")'
Updated 2026-04-16kali.org ↗