pip3 install keyboard command not working
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 12
- Joined: Thu Aug 11, 2022 5:38 pm
- Contact:
pip3 install keyboard command not working
This is the traceback:
```
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 4: expected statement.
pip3 install keyboard
^
Ren'Py Version: Ren'Py 8.0.1.22070801
Thu Sep 22 21:19:28 2022
```
How do I install this library to my project?
```
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 4: expected statement.
pip3 install keyboard
^
Ren'Py Version: Ren'Py 8.0.1.22070801
Thu Sep 22 21:19:28 2022
```
How do I install this library to my project?
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: pip3 install keyboard command not working
Some steps you need to consider.
1. Identify the python version that your renpy sdk is using. You can check the python version of your renpy sdk by going to the renpy launcher then hitting shift + o and entering the following.
2. Install the python version that your renpy sdk is using. To check if installed, launch a new terminal then enter the following.
3. Install pip. This usually gets installed alongside python. To check if installed, launch a new terminal then enter the following.
4. Create a python-packages folder inside your project's game folder (<your_project_path>/game/python-packages).
5. Launch a new terminal then enter the following.
6. Import it into your renpy scripts.
Reference: https://www.renpy.org/doc/html/python.h ... d-packages
1. Identify the python version that your renpy sdk is using. You can check the python version of your renpy sdk by going to the renpy launcher then hitting shift + o and entering the following.
Code: Select all
import sys; print(sys.version)
Code: Select all
python --version
Code: Select all
pip --version
5. Launch a new terminal then enter the following.
Code: Select all
pip install --target=<your_project_path>/game/python-packages <package_name>
Code: Select all
init python:
import <package_name>
-
- Newbie
- Posts: 12
- Joined: Thu Aug 11, 2022 5:38 pm
- Contact:
Re: pip3 install keyboard command not working
The 5th step is not working for some reason, it says access denied?
I don't know if this helps but my python is version 3.9.10 and pip is version 21.2.4
I don't know if this helps but my python is version 3.9.10 and pip is version 21.2.4
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: pip3 install keyboard command not working
Try launching a terminal with elevated permissions.
A note also that if your whole path contains spaces or weird characters then enclose it with double quotes.
A note also that if your whole path contains spaces or weird characters then enclose it with double quotes.
-
- Newbie
- Posts: 12
- Joined: Thu Aug 11, 2022 5:38 pm
- Contact:
Re: pip3 install keyboard command not working
Sorry I might not be that good with command prompt, but when I wrote the same thing it still says access denied(With administrative properties)
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: pip3 install keyboard command not working
Worked fine for me, didn't even have to elevate the command prompt.
Make sure that your root directory is writable, in the attached picture, my project exists under my user/username folder, so that should be safe. In short, try placing your project in the most common folders such as Documents, etc.
Make sure that your root directory is writable, in the attached picture, my project exists under my user/username folder, so that should be safe. In short, try placing your project in the most common folders such as Documents, etc.
-
- Newbie
- Posts: 12
- Joined: Thu Aug 11, 2022 5:38 pm
- Contact:
Re: pip3 install keyboard command not working
Oh I see my mistake was that I used "<" instead of quotation marks it worked now thanks a lot!
Who is online
Users browsing this forum: Google [Bot]