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

Hello! I'm getting import error while installing odoo17 community in my local system.

File "/home/siddharth/odoo/odoo/odoo/http.py", line 161, in

    from werkzeug.urls import URL, url_parse, url_encode, url_quote

ImportError: cannot import name 'URL' from 'werkzeug.urls' (/home/siddharth/py3.12-env/lib/python3.12/site-packages/werkzeug/urls.py)

I tried to change versions of Werkzeug library and tried with lower Python versions also. I'm getting the same issue after installing requirement.txt and required packages. I'm using Python virtual environment to install odoo17.





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

The /odoo/requirements.txt declares Werkzeug==2.0.2, so this is the target version (actually Werkzeug is in version 3.0.1 https://github.com/pallets/werkzeug/ and the URL class is no more there).


In Debian/testing fixed with the --break-system-packages option, use at your risk:


$ sudo aptitude remove python3-werkzeug

$ sudo pip3 install Werkzeug==2.0.2 --break-system-packages

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

I had the same issue .. how did you fix it?

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

as simple as that like usually how we install lib. from terminal 

make sure u typed name with version like : pip install Werkzeug==2.0.2

i hope this will work 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 24
1367
1
ก.ค. 24
5611
1
เม.ย. 24
5621
4
ส.ค. 25
2351
0
ม.ค. 24
2324