Check your python location and see if it's the same one as the python location in your editor. You can check your python location by opening command prompt or any other terminal,
then type where python if you are in window command prompt,
Get-Command python in windows powershell or
type which python if you are in mac, and now see in your editor if it's the same.
So recently i decided to learn how to code on python, and i tried downloading the keyboard module.
I went down to my cmd, typed "pip install keyboard", succesfull.
Tried to use it in python using "import keyboard", not so successfull.
Got this error messsage:
" import keyboard
ModuleNotFoundError: No module named 'keyboard'"
I tried uninstalling keyboard from my cmd, rebooting my pc, using the "pip3 install keyboard", nothing worked. I read somewhere that it might be due to an interpreter problem, but i don't knoow how to fix it.
Hope some of y'all could help me :)
Check your python location and see if it's the same one as the python location in your editor. You can check your python location by opening command prompt or any other terminal,
then type where python if you are in window command prompt,
Get-Command python in windows powershell or
type which python if you are in mac, and now see in your editor if it's the same.
I have noticed that you have not been using Anaconda, which is essential for installing in MacOS cause of some reasons. Please go to
https://www.anaconda.com/products/individual#Downloads
and install anaconda. Then follow the installation process and it should work. This is because MacOS has already python 2.7 per-installed, so you will have to install Anaconda to use python 3 and above. Using Anaconda, you can install any python packages without any error
Installing keyboard module blues
Problems with downloading Python module (keyboard) - Stack Overflow
Help with keyboard module. It does not work
pip can't install keyboard > 0.11 with python 2.7
Videos
I'm trying to import keyboard and it doesn't work. I'm using VSC and I have already tried
python -m pip install keyboard
pip3 install keyboard
pip install keyboard
It's already installed and the terminal will give me a text saying:Requirement already satisfied: keyboard in [path file]
I even installed the new version of pip 24.1.2
My Python version is also 3.11.7
the installed version of keyboard module is 0.13.5
I went through StackOverflow and Reddit and the best answer I could find was a guy with a case-sensitive error that didn't work for me.
Whenever i try to run something through the command prompt i get
'is not recognized as an internal or external command, operable program or batch file.'
in this case i just tried "C:\Python27\Scripts" to pip install a keyboard module there, but didn't work, i can do simply 'pip' in my command prompt and 'pip install keyboard' but it doesn't seem to change anything
» pip install keyboard