Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6464 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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 Odpovědi Zobrazení Aktivita
3
srp 25
2336
1
kvě 25
2555
1
dub 25
3517
1
dub 25
4344
1
dub 25
1823