Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2090 มุมมอง

I'm creating a new app

Inside my custom folder I have a .py file where i need to use mariadb package

I have installed using pip install mariadb

in my current directory Odoo\server

but when I'm trying to install my app I'm getting the error: No module named 'mariadb'

What else I need to configure? Thanks in advance




อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Thanks, I was able to install my custom app adding the packages to requiremets.txt in my local machine I have added this

'external_dependencies': {         
​'python': ['sqlalchemy','pymysql'],   
},

to the manifest of my custom app and as you said also installing the packages in the virtual environment VENV in VS Code 

Thanks in advance

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

1. Make sure that you installed the mariadb package in the same environment that Odoo is using.

Then, install the mariadb package using the correct Python environment


python3 -m pip install mariadb


2. Install the Package Globally or in a Virtual Environment:


pip install mariadb


3. If you're not using a virtual environment, you may need to install the package globally:


sudo pip3 install mariadb


Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 17
6127
1
มี.ค. 15
5292
2
มี.ค. 24
3868
2
ก.พ. 24
2828
3
พ.ย. 23
51440