Difference between revisions of "Installing pygame"
(Created page with "==Manual Installation== if you have access to the command line, and have already installed Python 3 (ie not via Visual Studio etc) you can type the following command to insta...") |
(→College Work Around) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==College Work Around== | ||
+ | Create a PythonApplication using Visual Studio from this: [[Create a python project in Visual Studio]] | ||
+ | |||
+ | At the moment you can't install pygame into python due to permissions, however it is easy to set it up without installing. You need to download the following zip file if you are using Python3.6: | ||
+ | |||
+ | [https://drive.google.com/file/d/1v7H3zlvcDNk21dJhfn6_PczMbaL6mehf/view?usp=sharing PyGame Libraries] | ||
+ | |||
+ | For Python3.8 use this: | ||
+ | |||
+ | [https://drive.google.com/file/d/1LE5bhXfBqqm7EYahexYIffQfDG7UOaYx/view?usp=sharing PyGame Libraries] | ||
+ | |||
+ | Extract these folders to the same location as your .py file. For example: | ||
+ | |||
+ | [[File:Pygamefolderstructure.png]] | ||
+ | |||
+ | The folders contain the required files to use PyGame and also the library to draw TMX maps. | ||
+ | |||
==Manual Installation== | ==Manual Installation== | ||
Line 8: | Line 25: | ||
If you added the Python option during the install process, Python3 should be installed along with the pip program. So on the tools tab, look for Python and then choose Python Environments. | If you added the Python option during the install process, Python3 should be installed along with the pip program. So on the tools tab, look for Python and then choose Python Environments. | ||
− | Now you should see a combo box with overview selected, change this to packages. This will show the packages currently installed, one should be pip. If at this stage pygame is listed then it is already installed if not, In the search box type pygame and press enter. | + | [[File:Python environment.gif|600px]] |
+ | |||
+ | Now you should see a combo box with overview selected, change this to packages. | ||
+ | |||
+ | [[File:Choose packages.gif|600px]] | ||
+ | |||
+ | This will show the packages currently installed, one should be pip. If at this stage pygame is listed then it is already installed if not, In the search box type pygame and press enter. You might get a message to escalate your privilges, choose yes. | ||
+ | |||
+ | [[File:Increase permissions.gif|600px]] | ||
+ | |||
+ | This will now install pygame. | ||
+ | |||
+ | [[File:Installation complete.gif|600px]] | ||
+ | |||
+ | One final step is to change the combo box to Intellisense, this will add the pygame commands to the intellisense system. | ||
+ | |||
+ | [[File:Choose intellisense.gif|600px]] | ||
− | + | If you didn't add Python during the installation of Visual Studio 2017, you can still add it by selecting the tools tab, and then choose Get Tools & Features to restart the installer, and allow you to add Python. I have used the default options and not added any other packages, this required an additional 470mb of disk space. |
Latest revision as of 13:27, 2 December 2020
College Work Around
Create a PythonApplication using Visual Studio from this: Create a python project in Visual Studio
At the moment you can't install pygame into python due to permissions, however it is easy to set it up without installing. You need to download the following zip file if you are using Python3.6:
For Python3.8 use this:
Extract these folders to the same location as your .py file. For example:
The folders contain the required files to use PyGame and also the library to draw TMX maps.
Manual Installation
if you have access to the command line, and have already installed Python 3 (ie not via Visual Studio etc) you can type the following command to install PyGame:
python3 -m pip install pygame
Visual Studio 2017
If you added the Python option during the install process, Python3 should be installed along with the pip program. So on the tools tab, look for Python and then choose Python Environments.
Now you should see a combo box with overview selected, change this to packages.
This will show the packages currently installed, one should be pip. If at this stage pygame is listed then it is already installed if not, In the search box type pygame and press enter. You might get a message to escalate your privilges, choose yes.
This will now install pygame.
One final step is to change the combo box to Intellisense, this will add the pygame commands to the intellisense system.
If you didn't add Python during the installation of Visual Studio 2017, you can still add it by selecting the tools tab, and then choose Get Tools & Features to restart the installer, and allow you to add Python. I have used the default options and not added any other packages, this required an additional 470mb of disk space.