Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
19477 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

Hi Rob,

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

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

Thanks,

Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

si there any solution for this ?

Imagine profil
Abandonează
Cel mai bun răspuns

use this app to install the module after installation restart server

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 21
2247
1
apr. 21
3667
0
apr. 21
2208
2
mai 24
2075
1
iun. 23
3026