SkLearn Installation

Hi! I just need some help on how to install sklearn library on replit? For some reason when i try to run

!pip install scikit-learn

It comes back with a module error. Looking for some help and guidance. Sorry for the simple question, i a new to replit and coming from Juypter Notebooks.

Could well be that the storage is not enough.
Try again and check the storage bar


Welcome to the community!

Don’t use an exclamation in front of pip. If pip install skikit-learn does not work, try poetry add skikit-learn instead.


Yup I think that as @whileTRUEpass said, Repls don’t have enough storage space…

psst… you can store files in home/runner/ and they do not take up any storage there

Yeah, but they get deleted on reboot.


thank you for the suggestion. I tried without the exclamamtion mark. still no luck. I am receiving this error?

Traceback (most recent call last):
File “”, line 2, in
from sklearn.ensemble import RandomForestRegressor
ModuleNotFoundError: No module named ‘sklearn’

I’m not even gonna lie when I looked on pypi for the package, it had no docs nor a github linked so.

Neither does my pypi module. Of course mine needs major code improvements which I haven’t had time for…

I found docs and a GitHub on google.
@MattPilkington As the pypi page says, try this: pip install -U scikit-learn

That didn’t work for him so.

They used poetry, not pip. Also, there might have been an installation error that they have not given us.

I looked at the builds on pypi but none of them had actual SRC so.

EDIT: I’ve been looking at the wrong package this entire time :sob: :skull: .

@bigminiboss is it true that files in home/runner/ get deleted on reboot? Is that why the repl is always on?


lol probably yeah XD


You need to import sklearn

They did, as you can see from the error XD