0

I have python 2.7.9 (which comes with pip already installed), I have numpy 1.8.2 and scipy 0.15.1 installed as well. When I try to install scikit-learn, I get the following error

pip install -U scikit-learn

SyntaxError: invalid syntax

What am I doing wrong? Or is there another way to install scikit- learn on windows, if I can't use pip ?

3
  • try easy_install scikit-learn Commented Feb 20, 2015 at 20:51
  • Are you trying this inside python? This is a shell command. Commented Feb 22, 2015 at 21:21
  • It maybe worth looking at anaconda or winpython which come with all this installed and doesn't mess up your current python environment Commented Apr 10, 2015 at 10:50

2 Answers 2

2

I strongly suggest that since you are on Windows to use either Anaconda or WinPython these are complete python environments with the full pydata stack preinstalled, they have numpy, scipy, sklearn, pandas, ipython etc.. They don't interfere with any current python installation and have package managers that allow you to upgrade relatively pain-free.

Sign up to request clarification or add additional context in comments.

Comments

0

Changing the directory worked in my case. Suppose your python 2.7.9 is in C drive so you set you directory as follows and write your command like this : C:\python27\scripts> pip install -U scikit-learn

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.