When I am trying to execute this in CMD
python get-pip.py
I am getting this error:
python: can't open file get-pip.py error 2] no such file or directory
While the file store in (get-pip.py)
C:\Python27\Tools\Scripts
The Python "FileNotFoundError: [Errno 2] No such file or directory" occurs when we try to open a file that doesn't exist in the specified location. To solve the error, move the file to the directory where the Python script is located if using a local path, or use an absolute path.
One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.
Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed. Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists. Step 4: Now wait through the installation process. Voila!
The latest pip has dropped support for Python 2 And you cannot install the latest pip via get-pip.py using Python 2.7. Update: Found an answer here with the script for Python 2.7 https://stackoverflow.com/a/65866547/429476. You should upgrade to Python 3.
For Linux/Mac, you can go for
curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py && sudo python get-pip.py
Try to either cd
into folder with script (cd "C:\Python27\Tools\Scripts"
) or add this folder to your PATH variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With