Hi everyone,
I'm trying to include an external python package - googleapiclient - in one of my Odoo models.
I run Odoo in the following way: sudo odoo -d odoo -u my_app-c /etc/odoo/odoo.conf
The output of which odoo is: /usr/bin/odoo
And the content of /usr/bin/odoo is:
#!/usr/bin/python3
# set server timezone in UTC before time module imported
__import__('os').environ['TZ'] = 'UTC'
import odoo
if __name__ == "__main__":
odoo.cli.main()
I've checked the python path during the execution of this script, and the output is as follows:
[
'/usr/bin',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages'
]
There isn't any site-packages folder in the path, which is where pip installs modules. I've been able to circumvent this by forcing pip to install the googleapiclient package in one of these folders, but this is a very problematic solution.
Can anyone explain to me what is the best way to install external Python dependencies for my custom Odoo module?