0

I've been trying to use Pygame on Sublime Text 4 for the longest. But every time I try to import it into Sublime Text it says that there's no module named Pygame. Which is weird seeing how I downloaded it already. I watched multiple videos about this, but nothing I try isn't working.

Fron
  • 1
  • 2
  • Did you install pygame in the same environment that Sublime is running in? – It_is_Chris Dec 16 '21 at 21:46
  • 2
    *"I downloaded it already."* You have to install it - `pip3 install pygame` – Rabbid76 Dec 16 '21 at 21:47
  • If you have already installed pygame using pip as Rabbid76 suggests, you might need to change which Python interpreter Sublime is using, see [this question](https://stackoverflow.com/q/23903415/2280890). – import random Dec 17 '21 at 01:14
  • Yeah, I tried doing that, I went to package control to see if I already had it. Unfortunately, I'm a complete noob at this. – Fron Dec 17 '21 at 23:56
  • Maybe it's having a hard time locating it because they're another file named Pygame – Fron Dec 17 '21 at 23:57
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 23 '21 at 20:20

2 Answers2

0

I have noticed that despite being installed on the computer using pip install pygame and testing shows its installed pygameWorking sublime still shows the module is not installed Pygame not working

Still looking for a solution for windows

Jose Ortiz
  • 705
  • 1
  • 9
  • 19
0

I recently added sublime text as another code editor for writing Python code, I'm wondering if you have your Pygame installed in the same directory as your Sublime Text editor installation? Because I read your question here on StackOverFlow.com, so I went to my installation of Sublime Text editor, and I wrote a quick pygame program to see if my installation of pygame would work, the program worked with no problems.

Charles
  • 1
  • 1
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/34462372) – dpapadopoulos May 31 '23 at 06:58