How do I install pygame for a new version of idle? (Windows) [duplicate]

2024/10/7 6:50:59

I installed a new version of IDLE, and I'm trying to install Pygame. I tried to use the pygame module, but when I did, the error message

Traceback (most recent call last): File "C:\Users\Kids\Desktop\Pygame Space Invaders\assets\Pygame_Space_Invaders.py", line 2, in import pygame ModuleNotFoundError: No module named 'pygame'

showed up. I'm fairly sure this is because pygame isn't installed with my current version of IDLE. I've tried numerous different pip commands trying to install it, but none of them seem to work.

'python3 -m pip install -U pygame --user', I've even tryed upgrading it with 'sudo pip3 install --upgrade pip', and 'sudo pip3 install pygame==2.0.0.dev6', and 'pip3.9 install pygame'.

Just for clarification, I already have it on my older version of IDLE, but I'm trying to get it on the newer version (3.9).

Answer

Try installing a development version of pygame. The latest version is 2.0.0.dev16, get it with pip install pygame==2.0.0.dev16.

https://en.xdnf.cn/q/118858.html

Related Q&A

How to parse a dynamic dom element?

I want to make a parser for scraping price, however I cant find the working method of parsing innerHTMLI dont know why, but selenium (getAttribute(innerHTML)), phantomjs (page.evaluation function(){ret…

Get a string in Shell/Python with subprocess

After this topic Get a string in Shell/Python using sys.argv , I need to change my code, I need to use a subprocess in a main.py with this function :def download_several_apps(self):subproc_two = subpro…

Python Indentation Error when there is no indent error [duplicate]

This question already has answers here:Im getting an IndentationError (or a TabError). How do I fix it?(6 answers)Closed 7 months ago.Is it me or the interpreter? I see no indentation error in my cod…

How to mark rgb colors on a colorwheel in python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 8 months ago.Improv…

Cant get Selenium to loop through two dialogue box options correctly

So basically: the goal is to click on each symbol for each sector on this website, that pops up a table with contact details, I want to copy all of that information and store it in a file. Right now ev…

Is it possible to use a JSON Web Token/JWT in a pip.conf file?

Im trying to make it possible for my application to fetch a package from a private feed in Azure DevOps using pip and a pip.conf file. I dont want to use a PAT for obvious reasons, so Ive created a ser…

sqlite3.Cursor object has no attribute __getitem__ Error in Python Flask

This is my code. I get this error everytime I press login:sqlite3.Cursor object has no attribute __getitem__This is my login tab:@app.route(/, methods=[GET, POST]) def login():error= Noneif request.met…

Merge Sort Implementation Check

I am doubtful of my implementation of the merge sort for two cases specifically:1. If the size of the list is 2, then I have swapped the values if they are not in the ascending order else I have return…

How to create a def in python that pick a specific value and then make a new dict like this

myDict ={"key1" : "val1","key2" : "val2","key3" : "val3","key4" : "x","key5" : "x"}I need a def in py…

Inputs required in python on csv files

I have a problem and need to solve it using Pandas/Python. Not sure how to achieve it and would be great if someone help here to build the logic. I have to generate the output file as below: df = pd.Da…