No module zk while using zklib

I am using zklib https://github.com/fananimi/pyzk to integrate zkteco device, but it gives error that no module zk.
If I create a python file in frappe bench folder it works but inside an app it doesnot, what is the solution?

@Khadija, you need to install the library in your local env that is inside your bench folder… this because frappe apps use the python virtual environment that is inside the bench folder (env).

follow these steps:

  1. add ‘git+https://github.com/fananimi/pyzk@master#egg=pyzk’ to your app’s ‘requirements.txt’ file.
  2. run ‘bench setup requirements

gives error
ERROR: Complete output from command python setup.py egg_info:
ERROR: error in erpnext setup command: ‘install_requires’ must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at “’+https:/’”

@Khadija, there is something wrong with your requirements.txt… please post the whole file here…