Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
6450 Visninger

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

Avatar
Kassér
Bedste svar

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

Avatar
Kassér
Forfatter

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 Besvarelser Visninger Aktivitet
3
aug. 25
2321
1
maj 25
2545
1
apr. 25
3515
1
apr. 25
4344
1
apr. 25
1821