0

The following gives a syntax error:

python -m pip install scikit-learn

SyntaxError: invalid syntax There is a "^" under the 2nd 'p' in pip.

I am using the SHELL. There are two programs in the Windows 10 program group: "Python 3.6 (32-bit)" and "IDLE (Python 3.6 32bit)." I am using the first one, which opens a small black command window.

The Python 3.6 man page says this is the way to install modules:

python -m pip install SomePackage

It also says pip is automatically included in Python 3.6. It also says that with 3.6 all dependencies of SomePackage are automatically installed (scikit-learn has two dependencies).

I tried "import pip" in another attempt, and I got exactly the same results.

Thanks for any help.

1 Answers1

0

This problem occurs when you try to run pip from the Python interpreter. Instead, run from the Windows Command Prompt and you should have no issues.

FCo
  • 485
  • 5
  • 17
  • Thank you. The man page should say "Windows command prompt" rather than "The standard packaging tools are all designed to be used from the command line." The Python REPL looks like a command screen. –  Sep 22 '17 at 17:23
  • Well, it didn't auto-install the dependencies numpy and scipy. Numpy manually installed okay. Scipy failed to install with a long list of errors... –  Sep 22 '17 at 17:38
  • @MikeSmith anything in particular? – FCo Sep 22 '17 at 17:45
  • 1
    I found a special version of scipy for Windows 10 here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ and now all is okay.. Thanks. –  Sep 22 '17 at 17:56