This post is a guideline on ‘How to install Pyglet on python 3.
Pyglet is used for object-oriented programming for developing high-graphic applications and games that can be executed in multiple operating systems including Microsoft windows and Mac OS. It is basically a library which can be imported into any python file to develop GUI based applications.
Pyglet can be installed in number of ways. One of the easiest is to use ‘pip’.It is a python instillation package which is used to install other packages. The good thing is that, pip is already installed in python. Following is the step by step procedure for installing pyglet.
Step 1:
Write ‘cmd’ in search bar in windows start menu. Open the command prompt on your PC. Type the following command and press enter:
pip install pyglet
This step might directly work for some users. If so, you will see the downloading and installation process of pyglet on screen. And you are ready to develop GUI based applications.
But for many, cmd will display an error stating ‘pip is not recognized as an internal or external command’.
This does not mean that pip is not installed on your PC. Instead it tells us that the pip installation package is not present in the current working directory. Therefore we now need to change our directory. Now follow Step 2.
Step 2:
Search for IDLE in search bar (in start menu). Right click on it, you will see a drop down menu. Select ‘Open file location’
Step 3:
Right click on IDLE, select properties from the drop down menu. You will see a window on the screen. Copy the path written next to the title ‘Target’.Ignore the part of the path after Python35-32\. It should be somewhat similar to that of mine which is as follows:
C:\Users\HP\AppData\Local\Programs\Python\Python35-32\pythonw.exe “C:\Users\HP\AppData\Local\Programs\Python\Python35-32\
Step 4:
Open command prompt, type ‘cd’ and paste the path copied in previous step and add Scripts\ to the path
cd C:\Users\HP\AppData\Local\Programs\Python\Python35-32\Scripts\
This command will change your directory to Scripts. Now we can use pip to install pyglet. To do this type the following command:
pip install pyglet
Pyglet will be downloaded and installed automatically on your machine.
Good idea to document this!
LikeLike
(y)
LikeLike