-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'pykeyboard' #6
Comments
The module missing is pyuserinput (which contains pykeyboard), you can try installing it in the venv with It's not being installed since aw-watcher-afk doesn't require it on Windows (it uses another approach for AFK detection), but aw-watcher-input needs it on all platforms to function, so it should probably be added to the dependencies. I'll look into it. |
Thanks, thant worked, but again I have a new one: PS C:\Users\myuser\activity_monitor\aw-watcher-input> poetry run aw-watcher-input
INFO:aw_watcher_input.main:Starting watcher...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\myuser\activity_monitor\aw-watcher-input\src\aw_watcher_input\main.py", line 27, in main
keyboard = KeyboardListener()
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\aw_watcher_afk\listeners.py", line 23, in __init__
PyKeyboardEvent.__init__(self)
File "C:\Users\myuser\AppData\Local\pypoetry\Cache\virtualenvs\aw-watcher-input-SuTwwcev-py3.9\lib\site-packages\pykeyboard\windows.py", line 232, in __init__
import pyHook
ModuleNotFoundError: No module named 'pyHook'
PS C:\Users\myuser\activity_monitor\aw-watcher-input> poetry run pip install pyHook
ERROR: Could not find a version that satisfies the requirement pyHook
ERROR: No matching distribution found for pyHook |
That's an issue with PyHook/PyWinHook which doesn't have any Python 3.9 compatible version on PyPI. See these lines in aw-watcher-afk: https://github.com/ActivityWatch/aw-watcher-afk/blob/9fc0e788e89e0982065d04e96dcf2abb5a44aa83/pyproject.toml#L18-L19 Try using Python 3.8 instead. I also updated the pyproject.toml in 3f88423, so pyuserinput should now be installed correctly on |
@ErikBjare thank your for your help, unfortunately I think I can not further test the project, as I am not really familiar with handling multiple versions of python as I just installed my python with chocolatey and I need python 3.9 for other project. I really appreaciate your time anyway. |
@nck974 That's okay. Thanks for being the first to test it out on Windows! |
The switch to pynput was completed in a232b68. Should work on Windows now, but let me know if it doesn't! |
So I was continueing from #5, and then when I executed
poetry run aw-watcher-input
and I get:I tried installing `pip install pykeyboard`` but I think that has to be done somehow inside the virtual environment as It did not seem to work.
The text was updated successfully, but these errors were encountered: