I\'ve just installed python 3.6 which comes with pip
However, in Windows command prompt, when I do: \'pip install bs4\' it returns \'SyntaxError: invalid syntax\' un
The problem is the OS can’t find Pip. Pip helps you install packages MODIFIED SOME GREAT ANSWERS TO BE BETTER
cd C:\Users\Username\AppData\Local\Programs\Python\Python37-32
In this directory, search pip with python -m pip then install package
python -m pip install ipywidgets
-m module-name Searches sys.path for the named module and runs the corresponding .py file as a script.
GO TO scripts from CMD. This is where Pip stays :)
cd C:\Users\User name\AppData\Local\Programs\Python\Python37-32\Scripts>
Then
pip install anypackage
You can also go into the directory where you have your pip.exe or pip3.exe located. For me it was on my D drive so here is what I did:
D:\>cd python
D:\python>cd Scripts
D:\python\Scripts>pip3.exe install tweepy
Hope it helps
You need to run pip install in the command prompt, outside from a python interpreter ! Try to exit python and re try :)
Don't enter in the python shall, Install in the command directory.
Not inside the python pip cannot be installed inside the python.
Even in the version 3.+ you don't have to write the python 3 instead just python.
which looks like
python -m pip install --upgrade pip
and then install others
python -m pip install jupyter
First go to python directory where it was installed on your windows machine by using
cmd
Then go ahead as i did in the picture
In windows, you have to run pip install command from( python path)/ scripts path in cmd prompt
C:/python27/scripts