Odoo cannot find PyPDF2

Question:

I have been trying to install odoo on my ubuntu 20.04 lts. Here is the error I’ve got

raitis@raitis-VirtualBox:~$ sudo systemctl start odoo13
raitis@raitis-VirtualBox:~$ sudo systemctl status odoo13
● odoo13.service - Odoo13
     Loaded: loaded (/etc/systemd/system/odoo13.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2020-05-07 20:51:28 EEST; 2s ago
    Process: 38644 ExecStart=/opt/odoo13/odoo-venv/bin/python3 /opt/odoo13/odoo/odoo-bin -c /etc/odoo13.>
   Main PID: 38644 (code=exited, status=1/FAILURE)

mai 07 20:51:28 raitis-VirtualBox systemd[1]: Started Odoo13.
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]: Traceback (most recent call last):
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]:   File "/opt/odoo13/odoo/odoo-bin", line 5, in <module>
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]:     import odoo
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]:   File "/opt/odoo13/odoo/odoo/__init__.py", line 75, in>
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]:     import PyPDF2
mai 07 20:51:28 raitis-VirtualBox odoo13[38644]: ModuleNotFoundError: No module named 'PyPDF2'
mai 07 20:51:28 raitis-VirtualBox systemd[1]: odoo13.service: Main process exited, code=exited, status=1>
mai 07 20:51:28 raitis-VirtualBox systemd[1]: odoo13.service: Failed with result 'exit-code'.
lines 1-15/15 (END)
^C
raitis@raitis-VirtualBox:~$ pip3 install Pypdf2
Requirement already satisfied: Pypdf2 in /usr/lib/python3/dist-packages (1.26.0)
raitis@raitis-VirtualBox:~$ 

It can’t find the pypdf2, however, it is installed, as you can see from the last lines. Have tried to install it using the apt too.

Asked By: Raicha

||

Answers:

Run the command sudo apt-get install python3-pypdf2

Answered By: Dipen Shah

You have a module installed on the system side, but it is not in odoo-venv. You should install it in venv. Be careful which pyhton interpreter you are running.

Answered By: Celal Taş
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.