Adding an External Python Package to Odoo sh

TEAM-BASSAM
November 25, 2022

Odoo depends on different various Python packages. To install certain applications in Odoo, it required to install specified Python packages. This blog will show how to install Python extensions via pip3.

External dependencies are the python packages or any binaries, that have to be installed to make the module work.

Odoo. sh is PaaS (Platform as a Service) controlled by Odoo SA.Using Odoo.sh, you can deploy your ownCloud platform. Sometimes, we might have to install some Python packages. In case your custom module requires an external Python package that is not installed by default, you can create a requirements.txt file. In this file, you can list the Python packages your module needs.

requirements.txt

requierment-text

Create a file named requirements.txt inside the root folder of your GitHub repository of the Odoo SH project. The Odoo. sh editor creates the file inside the path /src/user/requirements.txt, or the file can be created from your computer and then pushed to the GitHub repository along with the modules.

Request Your Free Quote

So Let’s we can use the external python library on our custom module.

You must set the external_dependency on the manifest.py file in order to use an external Python package.

external-dependency

Adding a Python dependency requires an increase in the version for the Odoo.sh platform.

Let’s take an example of your module version is currently 0.1 replace it to 0.2

Change

.Stage and commit your changes:

Stage-and-commit-your-changes

After that push the changes.

In Odoo. sh terminal,

Odoo.sh-terminalOpen the terminal in your system,

Another way of method is to install a python package on sh from the Odoo sh terminal itself. You should go to the Odoo. sh, shell, and type the commands for installing the python packages.

install-python-package

Sometimes, we need to install a python package to install on our Odoo. sh environment. So in that case, we can use these methods to install them.

DOWNLOAD ERP

"Unlock the Full Potential of Your Business with Odoo ERP!"

"Get a Cost Estimate for Your ERP Project, Absolutely FREE!"

Get a Free Quote

Leave a Reply

Your email address will not be published. Required fields are marked *