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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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)
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 7 25
|
33795 | ||
|
0
thg 6 21
|
4329 | ||
|
0
thg 2 20
|
3296 | ||
|
4
thg 9 18
|
12469 | ||
|
2
thg 2 18
|
4840 |