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

3 Likes

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.

2 Likes

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.

2 Likes

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 ā€œmain.pyā€, 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?

2 Likes

lol probably yeah XD

2 Likes

You need to import sklearn

They did, as you can see from the error XD

2 Likes