Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
12471 มุมมอง

I'm trying to build Odoo on Win11, but metting a broblem.
The source is just download from github several hours ago.

python odoo-bin -r odoo -w odoo --addons-path=addons -d mydb
Traceback (most recent call last):
File "C:\Users\bmpss\OneDrive\桌面\odoo\odoo-bin", line 5, in
import odoo
File "C:\Users\bmpss\OneDrive\桌面\odoo\odoo\__init__.py", line 75, in
import PyPDF2
ModuleNotFoundError: No module named 'PyPDF2'

อวตาร
ละทิ้ง

That's version error. Go to requirement.txt, find specific version of PyPDF2 following to Python version that you are using for odoo.

ผู้เขียน คำตอบที่ดีที่สุด

I finally solved the problem.

It's because I also install Inkscape on my notebook.

Inkscape contains python without PyPDF2, and it's PATH has more priority.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
The error message says that the PyPDF2 package is not installed in your machine, which is needed as one of the requirement for running odoo instance.

So you have to install this python package in your machine and restart the odoo service.

To install this package:

apt-get install python3-pypdf2

or

pip install PyPDF2


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

I DID install PyPDF2
When I try pip install, it tell me requirement already satisfied
BUT Odoo CANNOT run with the error above.

คำตอบที่ดีที่สุด

I have the same error in odoo.sh, but I don't understand why happen if pypdf2 is a parte of odoo16

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Still getting this error after installing the PYPDF2 package you must check the version of this package that supports Odoo 16, you can see the version in the requirements.txt file, and uninstall the package and reinstall the current version that supports Odoo 16 from the python packages without using the pip install pypdf2 command 

Hope it helps

อวตาร
ละทิ้ง
ผู้เขียน

I am sure I installed right version (2.12.1) of PyPDF2.

คำตอบที่ดีที่สุด

In Odoo 16 the PyPDF2 is installed by default (at least with the latest version of Odoo 16 as you can see in the attached image).

So I think, the error is in the "System  environment variables" as described in https://www.cybrosys.com/blog/how-to-install-odoo-in-windows#python-dependency-odoo-windows

Another trick is to launch python from the odoo python subfolder: C:\Program Files\Odoo 16.0.20230910\python\ python C:\Program Files\Odoo 16.0.20230910\server\odoo-bin ............

Of course, in your case, you have to change the path to python.exe and odoo-bin in accordance to your installation folder ( C:\Users\bmpss\OneDrive\桌面\odoo\odoo.........)

Good luck.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ส.ค. 25
2281
1
พ.ค. 25
2529
1
เม.ย. 25
3507
1
เม.ย. 25
4338
1
เม.ย. 25
1812