1. how to fix a broken Python installation
  2. In February 2022 I used these instructions to repair a hopelessly broken Python on an Ubuntu 16.04 machine that was prevent a release upgrade. Python was broken because apparently I had made the mistake of using

    sudo pip install
    at some point, which one is strongly advised never to use.

  3. how to install when-changed on Ubuntu 18.04
  4. In August 2021 I used the following to install when-changed on an Ubuntu 18.04 machine with Python3 already installed:
    pip install when-changed
  5. how to list all Python modules in a system (built-in and from custom PYTHONPATH)
  6. Launch Python and in the REPL type help('modules'). This will list all modules whether built-in or modules stored in a custom PYTHONPATH. By using help('somemodule') you can obtain more information including the path to the *.py file for each module. From the file information where you can easily see if the module is built-in or rather present in some custom PYTHONPATH.

  7. how to install IDLE (Integrated Development and Learning Environment) for Python 3
  8. sudo apt-get install idle3
  9. how to find Python packages installed by the user
  10. pip freeze
  11. how to find the Python sys.path (and the root locations of all Python packages)
  12. python -m site