there’s no pygame in Colab?
Question:
I saw some Python fractal rendering code and I wanted to try it inside Colab. I copied the code, made a new file, and copied it in and… it didn’t work. I wondered why, and it said “Module not found”.
The import code looked like this:
import pygame, sys, math, random, os
import numpy as np
import pyspace
This is what I think triggered the error itself:
import pygame
Like I said, I did this in Colab. Unless I figure out how to fix this myself, you need to figure out how to do this.
Answers:
If its not there, you just need to install it.
!pip install pygame
I saw some Python fractal rendering code and I wanted to try it inside Colab. I copied the code, made a new file, and copied it in and… it didn’t work. I wondered why, and it said “Module not found”.
The import code looked like this:
import pygame, sys, math, random, os
import numpy as np
import pyspace
This is what I think triggered the error itself:
import pygame
Like I said, I did this in Colab. Unless I figure out how to fix this myself, you need to figure out how to do this.
If its not there, you just need to install it.
!pip install pygame