0

I am a beginner to python programming, i have downloaded the python 3.6.1 version and installed it i have also trying to run with the idle file and the command prompt is coming . i have also set the path to environment variables in windows, but the problem is that when i am typing the command

 pip install sklearn 

the error showing is "syntaxError: invalid syntax" .It is not also recognizing the pip command also like it is giving

Traceback (most recent call last):
 File "<pyshell#1>", line 1, in <module>
  pip
NameError: name 'pip' is not defined

how i can use it please suggest.

Mandrek
  • 981
  • 2
  • 14
  • 35
  • Possible duplicate of [How do I run pip on python for windows?](http://stackoverflow.com/questions/33193374/how-do-i-run-pip-on-python-for-windows) – Arya McCarthy May 19 '17 at 08:29

2 Answers2

1

You may need to install pip separately first, meaning that the python install didn't include it for some reason.

This should have you covered: How do I install pip on Windows?

Download get-pip.py from https://bootstrap.pypa.io/get-pip.py. As a .py file!

Then via command prompt you can do the following: python get-pip.py

This solved it for myself.

Community
  • 1
  • 1
mtbrands
  • 124
  • 1
  • 2
  • 12
0

You are trying to execute a Linux code in a Python console. If you are using Win8, I would recommend to download and execute the Windows version of sklearn.

Arya McCarthy
  • 7,436
  • 3
  • 27
  • 48
TheoB
  • 131
  • 7