Good morning,
I am trying to install Odoo 14 on a Centos7 server, but I get the error:
● odoo14.service - Odoo14
Loaded: loaded (/etc/systemd/system/odoo14.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-04-07 12:24:44 CEST; 11s ago
Main PID: 63993 (code=exited, status=1/FAILURE)
Apr 07 12:24:43 systemd[1]: Started Odoo14.
Apr 07 12:24:44 odoo14[63993]: Traceback (most recent call last):
Apr 07 12:24:44 odoo14[63993]: File "/opt/odoo/odoo14/odoo-bin", line 5, in
Apr 07 12:24:44 odoo14[63993]: import odoo
Apr 07 12:24:44 odoo14[63993]: File "/opt/odoo/odoo14/odoo/__init__.py", line 75, in
Apr 07 12:24:44 odoo14[63993]: import PyPDF2
Apr 07 12:24:44 odoo14[63993]: ModuleNotFoundError: No module named 'PyPDF2'
Apr 07 12:24:44 systemd[1]: odoo14.service: main process exited, code=exited, status=1/FAILURE
Apr 07 12:24:44 systemd[1]: Unit odoo14.service entered failed state.
Apr 07 12:24:44 systemd[1]: odoo14.service failed.
I have tried to access the virtual environment and install the PyPDF2 module with pip install PyPDF2 and pip3 install PyPDF2,
but I get Requirement already satisfied: PyPDF2 in ./odoo14-venv/lib/python3.6/site-packages.
Does anyone know how to fix it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
I think your Odoo service start using system Python executable not the Python virtual environment and PyPDF2 is not installed in System python.
Solution, Configure Odoo in a Python virtual environment and modify systemd init script to use virtual environment Python to start Odoo.
Example line in etc/systemd/system/odoo14.service: (Change the paths as per your environment)
ExecStart=/opt/odoo/odoo14-venv/bin/python3 /opt/odoo/odoo14/odoo-bin -c /etc/odoo.conf
You will face another issue If server restarts (from reaching a CPU or memory limit for example) or from a SIGHUP, _reexec() in odoo/service/server.py starts up Odoo using system Python executable, not virtual environment Python executable. Likely because of this line in _reexec():
exe = os.path.basename(sys.executable)
Solution: Removing the os.path.basename from the line mentioned in _reexec() in file odoo/service/server.py
--auto-reload, virtualenv and JetBrains PyCharm · Issue #5570 · odoo/odoo (github.com)
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
2
mar. 25
|
31714 | ||
|
0
jun. 21
|
3695 | ||
|
0
fev. 20
|
2753 | ||
|
4
set. 18
|
11849 | ||
|
2
fev. 18
|
4302 |