0

I'm trying to install pip (which was already giving my trouble), and am doing the following:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Which seems to work as intended, but then when I attempt to run the next step of

py get-pip.py

I'm told Python was not found

Yet, if I run

py --version

It returns to me the current version of python that is installed.

I've installed python and pip before but I've never run into this issue. I'm assuming theres some small factor or syntax mistake I may be making that I'm not accounting for. Also, I am running this in a Windows 10 VM, and don't know if that would change anything.

Raaid C
  • 11
  • 1
  • add the `more` command output([from here](https://stackoverflow.com/questions/17217476/how-do-i-display-a-text-file-content-in-cmd)) – Xyndra Mar 15 '23 at 16:34

3 Answers3

0

I will advise you to reinstall both Python and Pip. To reinstall Python and Pip in a Windows 10 virtual machine, you can follow these steps:

  1. Uninstall Python: If you already have Python installed, uninstall it from your virtual machine. To do this, go to "Control Panel" > "Programs and Features," find Python in the list of installed programs, and click "Uninstall."
  2. Download the latest version of Python: Go to the official Python website at https://www.python.org/downloads/ and download the latest version of Python for Windows. Choose the appropriate version for your system (32-bit or 64-bit).
  3. Install Python: Double-click the downloaded installer file to start the installation process. Follow the instructions on the screen to complete the installation. Make sure to select the option to add Python to your PATH environment variable during the installation process.
  4. Check the Python installation: After the installation is complete, open a command prompt and type "python" to check if Python is installed correctly. You should see the Python version information displayed.
  5. Install Pip: To install Pip, download the "get-pip.py" script from https://bootstrap.pypa.io/get-pip.py. Save the script to your desktop or a convenient location with "CTRL + S".
  6. Install Pip: Open a command prompt and navigate to the directory where you saved the "get-pip.py" script using the command "dir" and "cd". Type "python get-pip.py" to run the script and install Pip.
  7. Check the Pip installation: After the installation is complete, type "pip" in the command prompt to check if Pip is installed correctly. You should see the Pip version information displayed.

That's it! You have now reinstalled Python and Pip in your Windows 10 virtual machine.

  • Hi, I actually tried this exact workflow and I wasn't able to get anywhere. When I try to run `py get-pip.py`, in the folder where I have the script, I get told that Python isn't installed, even though moments before I downloaded it. I even tried to make a test file in vscode and it works perfectly, but when I try the py get-pip.py, I get told theres no Python. – Raaid C Mar 15 '23 at 16:57
  • Try to use "python get-pip.py" instead of using "py get-pip.py" – Shamuel Vargas Mar 15 '23 at 17:02
0

You need to reinstall python, but when you are reinstalling click 'customize installation' and next click 'pip'. This should work.

NotMEE12
  • 74
  • 7
0

Make sure that when you install Python, you go to custom installation, and click the box that adds it to path. Previous versions of python may have the box available before you click custom installation.

lat
  • 3
  • 1