bm-mit / key-caster

An on-screen key stroke displayer app for Linux inspired by keycastr
0 stars 0 forks source link

ModuleNotFoundError: No module named 'keyboard' but I install all requirements #2

Open kartavkun opened 1 month ago

kartavkun commented 1 month ago

I make all actions like in guide, but it won't work

image

kartavkun commented 1 month ago

My system for sure image

bm-mit commented 1 month ago

Looks like you are running it in a virtual environment. Pls run sudo which python to find which Python program you are currently using. If not the python program from the venv, try to execute sudo ${path to your python inside venv} .

kartavkun commented 1 month ago

I used venv because I new at python on Linux(I used Python on Windows only) and when I tried to run pip install -r requirements I got an error, and after that I made the venv image

bm-mit commented 4 weeks ago

try this command, it should work. sudo rm /usr/lib/python3.12/EXTERNALLY-MANAGED Replace python3.12 with your python version. By default, Python on Arch will have this file, which needs to be removed for global package installation. Furthermore: https://askubuntu.com/a/1511013

kartavkun commented 4 weeks ago

Okay, I installed requirements, but I got it image

kartavkun commented 4 weeks ago

It didn't work :(

kartavkun commented 4 weeks ago

Reinstalled all reqs and got it

   ~/gi/key-caster    master ?1  pip install -r requirements.txt            ✔  21:06:21  
Defaulting to user installation because normal site-packages is not writeable
Collecting keyboard==0.13.5 (from -r requirements.txt (line 1))
  Using cached keyboard-0.13.5-py3-none-any.whl.metadata (4.0 kB)
Collecting PyQt5==5.15.10 (from -r requirements.txt (line 2))
  Using cached PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl.metadata (2.1 kB)
Collecting PyQt5-Qt5==5.15.2 (from -r requirements.txt (line 3))
  Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl.metadata (535 bytes)
Collecting PyQt5-sip==12.13.0 (from -r requirements.txt (line 4))
  Using cached PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (504 bytes)
Collecting PySide2==5.13.2 (from -r requirements.txt (line 5))
  Using cached PySide2-5.13.2-5.13.2-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl.metadata (4.8 kB)
Collecting PySide6==6.6.3.1 (from -r requirements.txt (line 6))
  Using cached PySide6-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 kB)
Collecting PySide6_Addons==6.6.3.1 (from -r requirements.txt (line 7))
  Using cached PySide6_Addons-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl.metadata (4.0 kB)
Collecting PySide6_Essentials==6.6.3.1 (from -r requirements.txt (line 8))
  Using cached PySide6_Essentials-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl.metadata (3.7 kB)
Collecting shiboken2==5.13.2 (from -r requirements.txt (line 9))
  Using cached shiboken2-5.13.2-5.13.2-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl.metadata (2.4 kB)
Collecting shiboken6==6.6.3.1 (from -r requirements.txt (line 10))
  Using cached shiboken6-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl.metadata (2.5 kB)
Using cached keyboard-0.13.5-py3-none-any.whl (58 kB)
Using cached PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl (8.2 MB)
Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Using cached PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl (360 kB)
Using cached PySide2-5.13.2-5.13.2-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (156.1 MB)
Using cached PySide6-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl (513 kB)
Using cached PySide6_Addons-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl (125.9 MB)
Using cached PySide6_Essentials-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl (82.5 MB)
Using cached shiboken2-5.13.2-5.13.2-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl (832 kB)
Using cached shiboken6-6.6.3.1-cp38-abi3-manylinux_2_28_x86_64.whl (171 kB)
Installing collected packages: shiboken2, PyQt5-Qt5, keyboard, shiboken6, PySide2, PyQt5-sip, PySide6_Essentials, PyQt5, PySide6_Addons, PySide6
  WARNING: The scripts pyside2-lupdate, pyside2-rcc and pyside2-uic are installed in '/home/kartavkun/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pyside6-android-deploy, pyside6-assistant, pyside6-deploy, pyside6-designer, pyside6-genpyi, pyside6-linguist, pyside6-lrelease, pyside6-lupdate, pyside6-metaobjectdump, pyside6-project, pyside6-qml, pyside6-qmlcachegen, pyside6-qmlformat, pyside6-qmlimportscanner, pyside6-qmllint, pyside6-qmlls, pyside6-qmltyperegistrar, pyside6-qtpy2cpp, pyside6-rcc and pyside6-uic are installed in '/home/kartavkun/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pylupdate5, pyrcc5 and pyuic5 are installed in '/home/kartavkun/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt5-5.15.10 PyQt5-Qt5-5.15.2 PyQt5-sip-12.13.0 PySide2-5.13.2 PySide6-6.6.3.1 PySide6_Addons-6.6.3.1 PySide6_Essentials-6.6.3.1 keyboard-0.13.5 shiboken2-5.13.2 shiboken6-6.6.3.1

    ~/gi/key-caster    master ?1  cd src                              ✔  9s   21:06:36  

    ~/gi/key-caster/src    master ?1  sudo python .                          ✔  21:06:51  
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/kartavkun/git-repos/key-caster/src/__main__.py", line 4, in <module>
    import keyboard
ModuleNotFoundError: No module named 'keyboard'
bm-mit commented 1 week ago

Find which pip you are currently using with which and sudo the python executable inside the pip located folder.