» pip install scikit-learn
Videos
» pip install sklearn
Just as a preface, I should say I'm a complete beginner that's only started learning python in the last few weeks.
I came across a question that wanted me to write a function that minimised the mean squared error/deviation for a list of integers.
I looked online about how to solve this and it seems both numpy and scikit-learn are 2 modules that can be used to solve this problem.
I then looked up how to install modules which instructed me to use the command prompt.
For numpy, I simply opened up the command prompt and typed in:
pip install numpy
That instruction was what I found on the numpy website and this seemed to work.
I then tried to install scikit-learn by typing in the following in the command prompt:
pip install -U scikit-learn
However, despite the fact that was the command prompt listed on the scikit website, there were a lot of issues (just a wall of red text after a minute or so) and tbh I just closed the command prompt in a panic.
From looking online, I read that typing in '-U' between 'install' and 'scikit...' was an error because the '-U' implies I already have scikit-learn installed and I just want to update it. Another fact that I found was that in order to install scikit-learn I first have to install scipy.
Can anyone tell me what I should do to install scikit-learn?
Having installed numpy already, is it enough to simply type in:
pip install scipy
Wait for that to install and then type in:
pip install scikit-learn
Any replies would be appreciated
» pip install sklearn-model
pip install numpy scipy scikit-learn
if you don't have pip, install it using
python get-pip.py
Download get-pip.py from the following link. or use curl to download it.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
You didn't provide us which operating system are you on? If it is a Linux, make sure you have scipy installed as well, after that just do
pip install -U scikit-learn
If you are on windows you might want to check out these pages.
- Source