Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6443 Vistas

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
Descartar
Mejor respuesta

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
Descartar
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

Publicaciones relacionadas Respuestas Vistas Actividad
3
ago 25
2283
1
may 25
2532
1
abr 25
3509
1
abr 25
4339
1
abr 25
1812