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

my env: Ubuntu 22.04 LTS, Odoo 16.0, Pycharm CE 2023.1

please help i am facing problem below, here is what i have done yet in Terminal.

cd odoo-server

/home/odoo16/odoo-server/odoo-bin -c /home/odoo16/odoo-server/odoo.conf -d odoo16 -u mytest

Traceback (most recent call last):
File "/home/odoo16/odoo-server/odoo-bin", line 5, in
import odoo
File "/home/odoo16/odoo-server/odoo/__init__\\\.py",\\\ line\\\ 113,\\\ in\\\
\\\ \\\ \\\ \\\ from\\\ \\\.\\\ import\\\ modules
\\\ \\\ File\\\ "/home/odoo16/odoo\\\-server/odoo/modules/__init__\\\.py",\\\ line\\\ 8,\\\ in\\\
\\\ \\\ \\\ \\\ from\\\ \\\.\\\ import\\\ db,\\\ graph,\\\ loading,\\\ migration,\\\ module,\\\ registry,\\\ neutralize
\\\ \\\ File\\\ "/home/odoo16/odoo\\\-server/odoo/modules/db.py", line 4, in
from psycopg2.extras import Json
ModuleNotFoundError: No module named 'psycopg2'

python3 -m venv venv
source venv/bin/activate
pip install psycopg2-binary

try starting again, but same error.

note: through pycharm it started server and i can access / run all apps including my custom test app.

regards

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

Hi,

When you are running from the terminal system may be using the default python version of the system and in the pycharm you may be running odoo with a separate python(may be a virtual env), so if you need to run from the terminal, you can select the same python version you have used in pycharm.


when you run odoo using the pycharm, see the first line in the pycharm log, you will get the command to run from the terminal.

Sample:

/home/dev/odoo/15.0/venv/bin/python /home/dev/odoo/15/odoo/odoo-bin -c /home/dev/odoo/15/conf/odoo.conf

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

thanks @Niyas Raphy again for help. its working fine now
the line below copied from pycharm as instructed and stopped here, open terrminal and pasted it on command line, hit enter... and its running successfully now.

/home/odoo16/odoo-server/venv/bin/python /home/odoo16/odoo-server/odoo-bin -c odoo.conf

regards

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ส.ค. 25
2334
1
พ.ค. 25
2554
1
เม.ย. 25
3517
1
เม.ย. 25
4344
1
เม.ย. 25
1823