How does one install a package on SH?
Do you use the shell or is there a better method?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How does one install a package on SH?
Do you use the shell or is there a better method?
Installing via the shell is not recommended.
Manually installing packages lacks resilience, is not shared across other containers, and may be lost during an upgrade to a newer version due to potential differences in Python versions.
If you would like to use an external Python library which is not installed by default, you can define a requirements.txt file listing the external libraries your modules depends on.
Please review our recommendations via the documentation at https://www.odoo.com/documentation/17.0/administration/odoo_sh/getting_started/first_module.html#use-an-external-python-library
Thank you for the insights Ray. My question stemmed from a warning on a test upgrade from 16>17. It seems that the pdfminer library is required by the Odoo addon attachment_indexation. Is it normally to manually install a package required by an addon?
Our DB started at 14 so maybe it was missed along the way?
Best to submit a ticket for the upgrade team via Support - I don't have that knowledge - it could have been missed.
Thank you Ray I'll do that.
Been exploring while waiting for a response to the ticket. On .sh I went to shell and ran 'pip list' and pdfminer is listed. I will add this info to the ticket.
Just to follow up on this in regards to pdfminer for the next person. pdfminer is not installed on the server that runs the upgrade and that creates the warning. pdfminer is installed on the .sh production server so the warning can be disregarded.
Hello,
To install the 'pdfminer' package on a Shell environment (SH) using pip3, you can follow these steps:
1. Open a terminal or Shell session.
2. Use the following command to install pdfminer using pip3:
pip3 install pdfminer.six
This command will download and install the pdfminer.six package, which is a maintained version compatible with Python 3.
Regarding your second question, installing packages via 'pip' in a Shell environment is a common and efficient method, especially for Python packages. If you have access to the shell, using 'pip' is a straightforward way to install packages. However, for some systems or environments, there might be other package management tools or methods available.
Hope it helps.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up