Pygame deployment

I’m having trouble deploying pygame. Is there a reason it works when I click run, but not when I deploy? I get several errors trying different ways, but mostly: “fatal: Failed to get Nix directories.”

Please send us a link to your Repl so it’s easier to help you

1 Like
that’s my replit. I can run, but can’t deploy. why not?

Hi – deployments are currently supported for web servers and background workers. VNC/desktop apps don’t work yet.


I’m no expert, so don’t fully understand… you mean pygame (or my specific code?) is a VNC/desktop app? And by currently, what’s the timeframe? i.e. would this work at some point as I have it or do I need to re-write in a better / different code for development?

Yeah, right now things like pygame will only work in the Workspace, and will not work in Deployments until we figure out how that would work. When you run pygame in the Workspace, it runs as a graphical desktop app (i.e. it has a GUI) as opposed to a server or bot. VNC is the name of the technology that we use to give you a “remote desktop” view of your application. If you want to run a game in a Deployment, it needs to be in a web based framework such as Kaboom.

1 Like

Crud… I subscribed to replit because you had pygame examples and my game ran on your site.
I presumed you used pygbag to actually deploy games to the web if not what’s the point of having a dev environment for them?

Very misleading … thanks

The code runs remotely on the repl, not on the browser:

you can probably set up a static deployment with pygbag yourself by configuring your repl.