Skip to main content

Install Python Packages

If your custom Odoo modules depend on third-party Python libraries, declare them in a requirements.txt file at the root of your repository. Skysize detects it and installs the listed packages on every deployment.


Add a requirements.txt file

At the root of your repository, create a file named requirements.txt and list one package per line:

requests
pandas==2.2.0
numpy>=1.26

Commit and push:

git add requirements.txt
git commit -m "Add Python dependencies"
git push

On the next deployment, Skysize runs the equivalent of pip install --user -r requirements.txt inside the Odoo container before the server starts, so the packages are importable by your modules.


How it works

  • The file is read from the root of your repository (the deployment mounts the repository root into the container and looks for requirements.txt there). A requirements.txt inside a subdirectory is not picked up.
  • Packages are installed into the container's per-user site, which lives on the deployment's persistent volume, so they persist across restarts.
  • Installation runs on every deployment (install and update), keeping the environment in sync with the file.

Python version

Packages are installed for the Python interpreter inside the Odoo container, not for whatever Python you run locally. A package that only publishes releases for a newer Python than your Odoo version ships cannot be installed.

Odoo versionPython version
16.03.9
17.03.10
18.03.12
19.03.12

The Python version comes from the Odoo image and is the same for Community and Enterprise deployments.

Before adding a dependency, check its Requires-Python value on its PyPI page (shown under "Meta" in the sidebar of the project page). If it asks for a Python newer than the table above, pip cannot install any of its releases and you will see an error like:

ERROR: Ignored the following versions that require a different python version:
1.4.0 Requires-Python >=3.13
ERROR: Could not find a version that satisfies the requirement your-package (from versions: none)
ERROR: No matching distribution found for your-package

When that happens, pin an older release of the package that still supports your container's Python, or use a different library. Upgrading the Python version inside the container is not possible: it is fixed by the Odoo version you deploy.


Check that your packages installed

The pip output for a deployment is available on its Logs tab: choose requirements.log in the Log file selector. It shows exactly what pip did, including the reason for any failure. See View Logs.


Notes and limitations

  • Standard pip requirement specifiers are supported (==, >=, ~=, etc.). Pin versions for reproducible builds.
  • If an install fails, the deployment continues with a warning rather than aborting, so check requirements.log to confirm your packages installed successfully.
  • pip installs the file as a whole. If one line cannot be satisfied, none of the packages in the file are installed, so a single bad requirement can look like several missing libraries. Fix the failing line and redeploy.
  • Removing a package from requirements.txt stops it from being installed on future deployments, but it is not actively uninstalled from an already-running deployment until that deployment is rebuilt.
  • Packages that need system libraries or compilers to build may fail to install in the container. Prefer wheels (pure-Python or pre-built) where possible.