0

I do not have administrative privileges' on my Windows 10 workstation. The IT department installed Python 2.7 as my request but I proceed a PIP upgrade without the "--user" setting, and now the already installed PIP got corrupted and I do not know how to recover it.

The corrupted PIP always return syntax error on lib\site-packages\pip_internal\cli\main.py", line 60 sys.stderr.write(f"ERROR: {exc}")

I can not run again the --upgrade or get-pip

I can write in the Python folder so I can change the main.py file.

Is there a way to manually recover the installation (without sudo)? I need to reinstall the Python?

  • I found a path forcing through an update with a wheel package with the following command: python pip-18.1-py2.py3-none-any.whl/pip install --no-index pip-18.1-py2.py3-none-any.whl The pip-18.1 was the newest whl file that I could find. After that the python -m pip install --user --upgrade pip pip back to work. – PMendes Feb 13 '21 at 13:53

1 Answers1

0

It would be better to reinstall Python, yes.

It would be better to install a version of Python that was actually still supported, such as 3.6 or newer.

AKX
  • 152,115
  • 15
  • 115
  • 172
  • Yes, I know that. But to port all my scripts to a newer Python version I need the 2.7 version working for troubleshooting. – PMendes Feb 13 '21 at 13:56