pythonian 23
pythonian 23

Reputation: 395

Python PIP stuck in uninstalled python version

I recently uninstalled python 3.6 because I was having problems with having 2 versions (3.6 and 3.8) of python installed. But now that I have python 3.6 uninstalled, pip does not work at all:

Fatal error in launcher: Unable to create process using '"c:\users\natur\appdata\local\programs\python\python36\python.exe"  "C:\Users\natur\AppData\Local\Programs\Python\Python36\Scripts\pip.exe" ': The system cannot find the file specified.

I understand that the pip.exe file was in the python 3.6 folder, and got deleted, but I also checked the pip option in the python 3.8 installer, and checked again by repairing. How would I make the pip command point to the pip.exe in python 3.8?

Upvotes: 1

Views: 1240

Answers (1)

vgp2018
vgp2018

Reputation: 96

It looks like environment variable issue, try removing python3.6 references from environment variable in this case it PATH:

import os
os.environ['PATH'] #will display environment variable for python3.6
os.environ['PATH'].remove('c:/path/to/python3.6')

and force install upgrade pip for 3.8.

python -m pip install --upgrade --force-reinstall pip #force upgrade

Upvotes: 3

Related Questions