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.

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, check the deployment logs to confirm your packages installed successfully, and look for a line mentioning the customer requirements.
  • 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.