跳至內容
選單
此問題已被標幟
4 回覆
19439 瀏覽次數

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/

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 21
2224
1
4月 21
3634
0
4月 21
2167
2
5月 24
2056
1
6月 23
2997