Skip to content
← Back to Community
Why does automatic installation of packages sometimes fail?
Profile icon
h
has Hacker Plan
PySimpleGUI

This problem seems to come and go, and it also varies across my different projects, despite the EXACT same import statement is used.

[Almost] ALL of my repl's begin with:
import PySimpleGUI as sg

Usually, or for long stretches of time, repl.it installs the package for me just fine. Other times it complains "PySimpleGUI package not found".

I don't understand why this keeps happening and why it's so intermittent that it would work for 1 project but not another in the same account.

PLEASE help! I love using repl.it to provide quick demonstrations for Reddit responses. It allows me to post code that uses my package without the people examining the code needing to install anything. Repl.it a BRILLIANT piece of work!!!!

-mike

Voters
Profile icon
ajanjairam
Profile icon
medhansh_rath
Profile icon
HarperframeInc
Profile icon
HackermonDev
Profile icon
PaoloAmoroso
Profile icon
PySimpleGUI
Comments
hotnewtop
Profile icon
HarperframeInc

Hi @PySimpleGUI

Repl.it gets their packages from another website called Python Package Index. I believe you are getting this issue because there maybe was something wrong while repl.it was trying to fetch the package, so it may have shown that error.

It does happen to me sometimes, and I can get really frustrated.

Have you tried moving your code to another repl or forking your repl to solve your issue?

I'm sure repl.it is sorry for your inconvenience, and they are doing their best to fix these issues.

Any questions? Please ask me.

Profile icon
PySimpleGUI

@HarperframeInc Aware of PyPI and how it works. Since it's happening to you as well and have an interest in getting it fixed, you can help that process by voting on this bug report:
https://repl.it/bugs/p/python-automatic-package-installs-intermittently-failing

Profile icon
HarperframeInc

@PySimpleGUI Okay! 👍

Profile icon
HackermonDev

It is a glitch with repl.it and they are trying their best to fix it!

Profile icon
PySimpleGUI

@AppliDev
That's what it felt like. It's SUPER frustrating for it to be intermittent like it is.
What's the timeframe for the fix? I had it happen again just now on a brand new program I started.

Profile icon
HackermonDev

@PySimpleGUI Yea! Repl.it are planning on adding something called UPM which is universal package manager so we will only need UPM.

Profile icon
PySimpleGUI

@AppliDev

I thought that just finished that work. Also thought it's a behind the scenes thing that's built-into the backend that does a better job of package management versus something you have to add or turn on.

Profile icon
HackermonDev

@PySimpleGUI I don't really know what it is!

Profile icon
PySimpleGUI

@AppliDev Really? Dude, why did you answer?

Profile icon
HackermonDev
Profile icon
PySimpleGUI
Profile icon
PaoloAmoroso

I can unfortunately only confirm it happens occasionally and suggest that you file a bug report.

By the way, if you use PySimpleGUI's web version I assume you import PySimpleGUIWeb as sg, right?

Profile icon
PySimpleGUI

@PaoloAmoroso Right, same import as you would on the desktop. Some of my programs here use the web version some use the tkinter version.

Profile icon
PySimpleGUI

@PaoloAmoroso
Thanks very much for the link to file a bug. I filed one. I didn't realize they're voted on:.... so feel free to vote people!

https://repl.it/bugs/p/python-automatic-package-installs-intermittently-failing

Profile icon
PaoloAmoroso

@PySimpleGUI I upovoted your bug report and you may want to encourage your GitHub users who are also Repl.it users to do the same.

Profile icon
ash15khng

You should add a requirements.txt file.
To do that, on the left bar there's a "add file" button. Click that and name the file "requirements.txt" (no inverted commas). Then add the line "PySimpleGUI" (again without quotes)
The module should be loaded when you import it. Hope this helps!

Profile icon
PySimpleGUI

@ash15khng
That's what I don't want to do. Repl.it should be automatically install the latest release.... it's a feature that's broken.

Profile icon
ash15khng

@PySimpleGUI Wait so is the package installing?

Profile icon
PySimpleGUI

@ash15khng Sometimes. Sometimes it does it automatically, sometimes you must manually install which creates the requirements.txt file. A project either does it or it doesn't. I've not been able to "fix" one that's broken.

Profile icon
PySimpleGUI

@ash15khng Can you help out by voting on the bug that was filed so that it gets some attention from Repl.it?
https://repl.it/bugs/p/python-automatic-package-installs-intermittently-failing

Profile icon
Masy

fork it

Profile icon
PySimpleGUI

@Masy
Is that a known workaround? These are projects I created not someone else's. It seems odd to fork my own project.