I download the get-pip.py from https://pip.pypa.io/en/stable/installing/ . Then i changed path in: system-variable environment into : C:\Python27\ArcGIS10.3\Lib\site-packages after that i tried to run in from the cmd and this is the result:
This question is related to
python-2.7
pip
For New versions
Older versions of python may not have pip installed and get-pip will throw errors. Please update your python (2.7.15 as of Aug 12, 2018).
All current versions have an option to install pip and add it to the path.
Steps:
Powershell
as admin. (win+x
then a
)python -m pip install <package>
.If python is not in PATH, it'll throw an error saying unrecognized cmd. To fix, simply add it to the path as mentioned below.
[OLD Answer]
Python 2.7 must be having pip pre-installed.
Try installing your package by:
win+x
then a
)C:\Python27\Scripts
pip install "package name"
.Note: Else reinstall python: https://www.python.org/downloads/
Also note: You must be in C:\Python27\Scripts
in order to use pip command, Else add it to your path by typing:
[Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
Add the following to you environment variable PATH
.
C:\Python27\Scripts
This path will contain the pip
executable file. Make sure it exist. If it doesn't then you'll need to install it using the get-pip.py
script.
Additonally, you can read the following link to get a better understanding.
Download pip script from https://bootstrap.pypa.io/get-pip.py and then run using python as:-
python get-pip.py
or you can use python to install modules directly
python -m pip install <module>
It is possible that in python 2.7 pip is installed by default. if it is not then you can execute
python -m ensurepip --default-pip
This worked for me.
This is one way of installing pip on a Windows system.
Download the "get-pip" python script from here: https://bootstrap.pypa.io/get-pip.py
Save the file as getpip.py
Run it from cmd: python getpip.py install
I've seen this issue before with 2.7.14. Fixed it by :
In cmd, run "where python" and then "where pip". Which will show for example:
? where python
C:\Python\python.exe
? where pip
C:\Python\Scripts\pip.exe
Run pip, then it should show different pip run command options.
pip is installed by default when we install Python in windows.
After setting up the environment variables path for python executables, we can run python interpreter from the command line on windows CMD
After that, we can directly use the python command with pip option to install further packages as following:-
C:\ python -m pip install python_module_name
This will install the module using pip.
you have to first download the get-pip.py and then run the command :
python get-pip.py
Source: Stackoverflow.com