Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
19480 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

Hi Rob,

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

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

Thanks,

Avatar
Zrušit
Autor

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

Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

si there any solution for this ?

Avatar
Zrušit
Nejlepší odpověď

use this app to install the module after installation restart server

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 21
2249
1
dub 21
3669
0
dub 21
2209
2
kvě 24
2075
1
čvn 23
3026