Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
4 Відповіді
19433 Переглядів

Say I want to install a python library called opencv when I install my custom module in a new system, how can I do this automatically?

Basically I want to run


pip install opencv-python == 2.4.9

automatically when I install my module in a system not having opencv

Аватар
Відмінити
Найкраща відповідь

Hi Rob,

You can define below key,value pair in __manifest__.py file:

'external_dependencies': {
   'python': ['opencv-python'],
}

Thanks,

Аватар
Відмінити
Автор

This only checks whether the dependency is installed or not and prevents app from installing. It does not automatically install the dependency.

Найкраща відповідь

Hi,

Can you refer the blog below, Hope it can be achieved by using the hook

External Dependencies ,Pre Init Hook & Post Init Hook In Odoo
Regards

Аватар
Відмінити
Найкраща відповідь

si there any solution for this ?

Аватар
Відмінити
Найкраща відповідь

use this app to install the module after installation restart server

https://apps.odoo.com/apps/modules/14.0/pip_module/

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
серп. 21
2223
1
квіт. 21
3631
0
квіт. 21
2167
2
трав. 24
2051
1
черв. 23
2995