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
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
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)
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
2
März 25
|
31715 | ||
|
0
Juni 21
|
3696 | ||
|
0
Feb. 20
|
2753 | ||
|
4
Sept. 18
|
11849 | ||
|
2
Feb. 18
|
4303 |