Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
9 Trả lời
117314 Lượt xem

I had install the requirements that are there in the requirements script but than also its showing that the PyPdf2 is missing.

I had also install it manually but again the same issue.

Had tried

pip install python-Pypdf2

sudo apt-get install pypdf2

Easy_install pypdf2

But all installed properly,but the message appears again

This is only happening while adding new odoo 11 version

For the 9 version nothing any issue


Ảnh đại diện
Huỷ bỏ

Hi,

Try This. Your one not working with python 3.

sudo apt install python3-pip

pip3 install -U pip

sudo pip3 install pypdf2

If you use a python venv (as I think):

The problem is a session that is bad terminated, ODOO restart the service but not use VENV context so python3 doesn't find correct dependencies

See the correct mode to launch if venv is used:

https://github.com/odoo/odoo/issues/33479#issuecomment-1207347677

Câu trả lời hay nhất

Hi,

While installing using pip , the package get installed in python2.  Try the same using pip3 .

pip3 install Pypdf2

Thanks

Ảnh đại diện
Huỷ bỏ

Hi...!

I install the module and all was successful I haven't error, but when I run the environment I get the same error.

/home/jmsolorzano78/PycharmProjects/demo/venv/bin/python /opt/odoo13/odoo/odoo-bin --conf /home/jmsolorzano78/PycharmProjects/demo/odoo.conf

Traceback (most recent call last):

File "/opt/odoo13/odoo/odoo-bin", line 5, in <module>

import odoo

File "/opt/odoo13/odoo/odoo/__init__.py", line 75, in <module>

import PyPDF2

ModuleNotFoundError: No module named 'PyPDF2'

Pls Can you have another information or process to do?

Hi I already installed Pypdf2, but still show "ModuleNotFoundError: No module named 'PyPDF2'". How to do that bro ?

Câu trả lời hay nhất

Hi,

Try This. Your one not working with python 3.

sudo apt install python3-pip

pip3 install -U pip

sudo pip3 install pypdf2

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

If you use a python venv (as I think):

The problem is a session that is bad terminated, ODOO restart the service but not use VENV context so python3 doesn't find correct dependencies

See the correct mode to launch if venv is used:

https://github.com/odoo/odoo/issues/33479#issuecomment-1207347677

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Same error here. the server can launch successful, but failed after couple of hours, and show following erorr:

Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: Traceback (most recent call last):
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: File "/home/odoo/odoo-15/odoo-bin", line 5, in
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: import odoo
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: File "/home/odoo/odoo-15/odoo/__init__.py", line 75, in
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: import PyPDF2
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z odoo-15[3189]: ModuleNotFoundError: No module named 'PyPDF2'
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z systemd[1]: odoo-15.service: Main process exited, code=exited, status=1/FAILURE
Mar 14 22:51:28 iZbp1feheb80mwpd2778a7Z systemd[1]: odoo-15.service: Failed with result 'exit-code'.


How should I do?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

if you are using pycharm, that may cause from Python Interpreter Environment .

FILE |Settings| Project xxx |Python Interpreter installation path or  choose Setting => Add : Python System interpreter that will include almost module necessary to run Odoo


Good luck

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Go to environment step and run this command apt-get install python3-pypdf2 
Remember console will tell you to other dependency jinja2 and then just add the name of the package, for instance, apt-get install python3-psutil

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

tried, I still get the same error of "ModuleNotFoundError: No module named 'PyPDF2'".

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Another workaround is to do the following:

apt-get install python-pypdf2

dpkg --ignore-depends=python-pypdf -i odoo_*

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Again the Same Issue:

odoo@ebslubuntu2:/opt/11$ ./odoo-bin --xmlrpc-port=9000

Traceback (most recent call last):

File "./odoo-bin", line 5, in <module>

import odoo

File "/opt/11/odoo/__init__.py", line 84, in <module>

from . import modules

File "/opt/11/odoo/modules/__init__.py", line 8, in <module>

from . import db, graph, loading, migration, module, registry

File "/opt/11/odoo/modules/graph.py", line 10, in <module>

import odoo.tools as tools

File "/opt/11/odoo/tools/__init__.py", line 7, in <module>

from . import pdf

File "/opt/11/odoo/tools/pdf.py", line 4, in <module>

from PyPDF2 import PdfFileWriter, PdfFileReader

ImportError: No module named 'PyPDF2'

Ảnh đại diện
Huỷ bỏ

check your PyPDF version and remove all files using bellow command.

sudo apt-get purge python-pypdf

the try bellow command again

sudo apt install python3-pip

pip3 install -U pip

sudo pip3 install pypdf2

Despite the above error is occurring again. like this "ImportError: No module named 'PyPDF2'" Odoo --v 11 , i'm using macOS 10.13.4 .

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 6 20
3517
3
thg 7 25
561
3
thg 6 25
3789
5
thg 5 25
4498
2
thg 5 25
1496