When i try to uninstall pip, I am getting the error below
$python2.7 -m pip uninstall pip Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/site-packages/pip-21.0.1-py2.7.egg/pip/__main__.py", line 21, in <module> from pip._internal.cli.main import main as _main File "/usr/lib/python2.7/site-packages/pip-21.0.1-py2.7.egg/pip/_internal/cli/main.py", line 60 sys.stderr.write(f"ERROR: {exc}") ^ SyntaxError: invalid syntax I ran whereis pip to know the location it is installed. It returned
/usr/bin/pip /usr/bin/pip2.7 When I was trying to install pip, I tried yum install python27-python-pip and then easy_install pip by mistake from where it started to error out like this. How can I fix this ?
pipas root. Create virtualenv instead and run it inside.