Skip to main content

Install pip on Windows

  • If you haven't downloaded get-pip.py yet: You need to download this file from the official pip website or use curl in your command prompt.

    • Using curl (recommended): Open Command Prompt and type:

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

      This will download the file to your current directory in the Command Prompt.

    • Manual Download: Go to https://bootstrap.pypa.io/get-pip.py in your web browser, right-click on the page, select "Save as...", and save the file as get-pip.py to a location you can easily navigate to (e.g., your Downloads folder, or a dedicated Python projects folder).

  • The file is in a different directory: You might have downloaded get-pip.py to your Downloads folder, your Desktop, or another location, but you're trying to run the command from C:\Users\gparn.

    • Solution: Navigate to the directory where you saved get-pip.py in your Command Prompt using the cd (change directory) command.

      • Example (if in Downloads):

        DOS
        cd C:\Users\gparn\Downloads
        
      • Example (if on Desktop):

        DOS
        cd C:\Users\gparn\Desktop
        
      • Tip: Once you cd to the correct directory, you can type dir (or ls on Linux/macOS) and press Enter to list the contents of the current directory and confirm that get-pip.py is indeed there.

  • Typo in the filename: Double-check that you've typed get-pip.py correctly. It's case-sensitive on some systems, though generally not on Windows for filenames.

    • Solution: Verify the exact filename.

  • Incorrect file extension (hidden): Sometimes, if you're not showing file extensions in Windows File Explorer, you might have accidentally saved the file as get-pip.py.txt.

    • Solution: Enable "File name extensions" in File Explorer's "View" tab to see the full name. If it's get-pip.py.txt, rename it to get-pip.py.

2. You're running the command from the wrong place (as explained previously for IDLE)

  • This error message often appears when people try to run command-line instructions within a Python interpreter (like the IDLE shell, which is not what you want for get-pip.py).

  • Solution: Make sure you are running the python get-pip.py command in your Windows Command Prompt (CMD) or PowerShell, not within the IDLE Python shell or any other Python interpreter.

Steps to Fix and Install Pip on Windows 11:

  1. Open Command Prompt: Press Win + R, type cmd, and press Enter.

  2. Download get-pip.py:

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

    (This will download it to your current directory, which is usually C:\Users\gparn by default when you open a new Command Prompt.)

    • Alternative: Manually download get-pip.py from https://bootstrap.pypa.io/get-pip.py and save it to C:\Users\gparn.

  3. Navigate to the correct directory (if you saved it elsewhere): If you downloaded it to, say, your Downloads folder:

    DOS
    cd C:\Users\gparn\Downloads
    

    (Or whatever the full path is where you saved it.)

  4. Run the installation script:

    DOS
    python get-pip.py
    

    Self-correction: If you have multiple Python versions, you might need to use py -3 get-pip.py or python3 get-pip.py depending on how your Python is set up. python usually points to Python 3 on recent Windows installs if installed correctly.

  5. Verify Pip installation:

    DOS
    pip --version
    

    If it was successful, you should see output showing the pip version and its location.

Important Note: Modern Python installations (especially from python.org) usually include pip by default. You might not even need to run get-pip.py. You can often install or upgrade pip using the ensurepip module:

DOS
python -m ensurepip --upgrade

This is generally the preferred way to install or update pip if it's missing or outdated in an existing Python installation.

Comments

Popular posts from this blog

Learn GitHub

Learn GitHub git init git add file.txt git commit -m "my first commit" git remote add origin https://github.com/dansullivanma/devlops_data_sci.git git clone https://github.com/dansullivanma/devlops_data_sci.git

Garbage collection in Databricks

Clean up snapshots Delta Lake provides snapshot isolation for reads, which means that it is safe to run  OPTIMIZE  even while other users or jobs are querying the table. Eventually however, you should clean up old snapshots. You can do this by running the  VACUUM  command: VACUUM events You control the age of the latest retained snapshot by using the  RETAIN   <N>   HOURS  option: VACUUM events RETAIN 24 HOURS Test the garbage collection You can specify  DRY   RUN  to test the garbage collection and return a list of files to be deleted: VACUUM events DRY RUN Configure the retention threshold The  VACUUM  command removes any files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold. The default threshold is 7 days, but you can specify an alternate retention interval. For example, to delete all stale files older t...

Error The Specified driver class (org.postgres.Driver) is not available!

SQL Workbench error for PostgreSQL connection: The Specified driver class (org.postgres.Driver) is not available! Below is the error which can appears while connecting to a PostgreSQL databases in SQL workbench: This could be due to Postgres driver is not found by the Workbench tool. This could happen if the folder containing the driver is moved or deleted. Solution: To fix this issue,  1. Open Workbench and go to File - > Manage Drivers 2. Select PostgreSQL 3. Under the Library option select the Folder where the driver is located and select the driver and click on Open. you can download the latest Postgres JDBC drivers at:  https://jdbc.postgresql.org/download.html 4. Click on OK to to close the Manage Drivers window. 5. Now try to connect to the PostgreSQL database with correct credentials, it should connect.