Ask coding questions

← Back to all posts
New Python Packages and Repl.it
h
BD103 (126)

I created a PyPI package and uploaded it. I'm now having issues with using it.

I can run pip install BD103 and then run the project and its modules. That's cool and all, but I know replit automatically imports projects and adds them to poetry.

My issue is that using PIP does not automatically create the pyproject.toml file, replit does. But replit doesn't detect my package. Here's an example:

from bd103 import load

load.load()

print("Done!")

This should display a loading bar, but it doesn't. Replit refuses to automatically download my package and add it to poetry.

Ok. That may have been a lot of useless typing. In short:

How do I get replit to import my package without typing pip install BD103 every single time?

Thanks for you help,
~ @BD103

P.S. The repl attached is my package. I'm pretty sure there is nothing wrong with it, but I wanted people to be able to connect the two together. :)

Comments
hotnewtop
BD103 (126)

Found out that Replit hard codes the import statement guessing, like Flask.

CodeLongAndPros (1591)

Go to the the right tab and click the middle icon then search.

BD103 (126)

Thanks, but is there a way to just use import bd103? Not having to add packages through PIP or package manager? @CodeLongAndPros

Coder100 (17018)

yeah, repl.it tries to install from a cache (i think), but does the packager not work?

BD103 (126)

The packager works, but other packages I can automatically install. I guess I'm trying to figure out how to add my package to the cache. @Coder100

RYANTADIPARTHI (6001)

I have experience with this in django. Where each time, i have to use pip install so, there is no way of doing it, i don't think. But you just have to do it. Report it to bugs, or feedback.

BD103 (126)

Lol. I literally got in an argument with other replers when I asked them to mark my post. :)
@RYANTADIPARTHI
I will, but I want to see if anyone else has a solution
:P