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:
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:
- Open
Powershell
as admin. (win+x
thena
) - Type
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[1].
[OLD Answer]
Python 2.7 must be having pip pre-installed.
Try installing your package by:
- Open cmd as admin. (
win+x
thena
) - Go to scripts folder:
C:\Python27\Scripts
- Type
pip install "package name"
.
Note: Else reinstall python: https://www.python.org/downloads/
[1] 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")
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.
:\Python27\python.exe: No module named ensurepip
–
Arkansas 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 :
- Re-install python 2.7.14
- During the installation, select default path and put a check mark in the installation options to add python to windows path i.e. environmental variables.
- After installation is complete, go to System from the Control Panel, select Advanced system settings, and clicking Environment Variables.
- Verify that the system variable "path" has "C:\Python\;C:\Python\Scripts;" added to the list.
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.
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.
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
© 2022 - 2024 — McMap. All rights reserved.
Scripts
subfolder. – Kisangani