![]() |
Free Online IDE / Interpreter - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Free Online IDE / Interpreter (/thread-42203.html) |
Free Online IDE / Interpreter - Jameyson72 - May-27-2024 I'm trying to get into game development, but for some reason I am unable to install pygame or any of its dependencies on my Chromebook, despite having Linux enabled and Python3 installed. I was wondering if there is a free online IDE / Interpreter that has all the Python libraries included, to allow me to run scripts that make use of these libraries? I've tried One Compiler and a couple others, but when I attempt to import pygame or other libraries, I get an error that says: Any help would be very much appreciated.
RE: Free Online IDE / Interpreter - Gribouillis - May-27-2024 (May-27-2024, 04:26 PM)Jameyson72 Wrote: ModuleNotFoundError: No module named 'pygame'Have you tried to install pygame from a linux terminal?I don't know chromebooks but This pdf document looks interesting in your case. RE: Free Online IDE / Interpreter - snippsat - May-27-2024 There are many good online environment like eg Codespaces, Replit, Colab The problem with Pygame is that in need native OS stuff,so no window will show up in browser in these environments. I don't have Chromebook so untested. Step 1: Ensure Linux (Crostini) is Enabled Scroll down to Linux (Beta) and turn it on. Step 2: Update Linux and Install Dependencies sudo apt-get update sudo apt-get upgradeStep 3: Install dependencies and Python3 and Pip sudo apt-get install libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev sudo apt-get install python3 python3-pipStep 4: Install pygame pip3 install pygameStep 5: Verify the Installation # test_pygame.py import pygame pygame.init() # Set up display window = pygame.display.set_mode((400, 300)) pygame.display.set_caption('Pygame Test') # Main loop running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False pygame.quit()In terminal. python3 test_pygame.py RE: Free Online IDE / Interpreter - ebn852_pan - May-28-2024 I use a chrome book. And this code tested good. print("Try programiz.pro") import math import time def myfunc(Image): player = "RossKagawa5.jpg" print("This picture is UH baseball 1987.") myfunc("RossKagawa5.jpg")Try programiz.pro This picture is UH baseball 1987. === Code Execution Successful === |