Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

See which Python modules are available

This guide shows how to list the Python modules installed for your app, so you know what you can use.

Web Hosting2 min read9 steps

What is a module?

Python is a programming language. A module is a ready-made set of code you can borrow, like a tool from a toolbox. Instead of writing everything yourself, you write import name and use the tool. Packages are bigger collections of modules.

Different Python versions and different virtual environments have different modules. A virtual environment is a private folder that keeps one app's tools apart from other apps.

Method 1: Ask pip

pip is the tool that installs and lists Python packages.

  1. Open a terminal. On hosting, connect with SSH if it is enabled on your plan.
  2. If your app uses a virtual environment, enter it first. In cPanel, the Setup Python App page shows the exact command to copy.
  3. Run:
python -m pip list

This prints each installed package with its version. On some systems you must type python3 instead of python.

Method 2: Ask Python itself

  1. Start Python:
python3
  1. Type:
help("modules")

This prints a long list of every module Python can find, including built-in ones. It may take a moment.

  1. Type exit() to leave.

Method 3: Test one module

If you only need to know whether one module exists, try to import it:

python3 -c "import requests; print(requests.__version__)"

If the module exists, you see its version. If not, you see "ModuleNotFoundError".

Method 4: Save the list

python -m pip freeze > requirements.txt

This writes the list into a file named requirements.txt. You can use it later to install the same set on another server.

If a module is missing

  1. Enter the right virtual environment.
  2. Run python -m pip install module-name.
  3. Restart your app so it can use the new module.
Tip: If you cannot install modules on your plan, ask Hostvento support at https://secure.hostvento.com/submitticket.php.

Quick recap

  • A module is ready-made code you can reuse.
  • Use python -m pip list to see installed packages.
  • Use help("modules") for the full list.
  • Work inside the right virtual environment.