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

Trying to install the the hr_zk_attendance module by cybrosys, (cant post link yet)

Odoo 17.0-20240711 (Community Edition)

Then, i got this error at first.


Unable to install module "hr_zk_attendance" because an external dependency is not met: Python library not installed: pyzk 



Then i installed in the debian 12 container like this, otherwise i would get externally managed error thing :


root@odoo17:~# sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old


root@odoo16:~# pip3 install zklib 


Collecting zklib


  Using cached zklib-0.1.1-py3-none-any.whl


Installing collected packages: zklib


Successfully installed zklib-0.1.1


WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead:


Restart both containers, 

But even with that i still get same error when activating. 

Any thoughts?


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

Do you have a virtual environment(venv) for your odoo. If yes try to install zklib after activating virtual environment
If you don't have venv check your python/lib/sit-packages inside check if you have zklib or not.

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

Hi,
You have to ensure that the package has been installed/ trying to install is on the same python version, which is used to run the odoo.

Thanks

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

Solved, It was because i installed in the host instead of the container.

Ảnh đại diện
Huỷ bỏ
Tác giả

root@odoo17:/# python3.11 -m pip freeze
argcomplete==2.0.0
attrs==22.2.0
Babel==2.10.3
certifi==2022.9.24
chardet==5.1.0
charset-normalizer==3.0.1
click==8.1.3
colorama==0.4.6
crit==3.17.1
distlib==0.3.6
distro==1.8.0
docker==5.0.3
docker-compose==1.29.2
dockerpty==0.4.1
docopt==0.6.2
filelock==3.9.0
future==1.0.0
ghp-import==2.1.0
gpg==1.18.0
httplib2==0.20.4
idna==3.3
iniconfig==1.1.1
Jinja2==3.1.2
joblib==1.2.0
jsonpointer==2.3
jsonschema==4.10.3
livereload==2.6.3
lunr==0.6.2
Markdown==3.4.1
MarkupSafe==2.1.2
mergedeep==1.3.4
mkdocs==1.4.2
more-itertools==8.10.0
nltk==3.8
numpy==1.24.2
packaging==23.0
pipx==1.1.0
platformdirs==2.6.0
pluggy==1.0.0+repack
protobuf==4.21.12
psutil==5.9.4
py==1.11.0
pycurl==7.45.2
Pygments==2.14.0
pyinotify==0.9.6
pyparsing==3.0.9
pyrsistent==0.18.1
PySimpleSOAP==1.16.2
pytest==7.2.1
python-apt==2.6.0
python-dateutil==2.8.2
python-debian==0.1.49
python-debianbts==4.0.1
python-dotenv==0.21.0
pytz==2022.7.1
PyYAML==6.0
pyyaml_env_tag==0.1
pyzk==0.9
pyzk-new==0.9.1
regex==2022.10.31
reportbug==12.0.0
requests==2.28.1
rfc3987==1.3.8
simplejson==3.18.3
six==1.16.0
texttable==1.6.7
tornado==6.2
tqdm==4.64.1
uritemplate==4.1.1
urllib3==1.26.12
userpath==1.8.0
virtualenv==20.17.1+ds
watchdog==2.2.1
webcolors==1.11.1
websocket-client==1.2.3
zklib==0.1.1

like this? pyzk is already on 3.11

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
1709
1
thg 9 24
1972
4
thg 7 25
6387
2
thg 5 23
4571