Article 5DCMP Invalid Syntax Error After Upgrading to Pip 8.1.2 in CentOS 7.2.1511

Invalid Syntax Error After Upgrading to Pip 8.1.2 in CentOS 7.2.1511

by
rakeshmanmohan
from LinuxQuestions.org on (#5DCMP)
I'm not very experienced with programming so I am in need of guidance/advice.

I installed pip on my CentOS 7 web server using 'yum install epel-release' to add the repo and then 'yum install python-pip' which worked.

However, after I used pip to install the requests module I got a message on the command line suggesting I upgrade pip. So I ran the command 'pip install --upgrade pip' & successfully upgraded to pip version 8.1.2.

The problem is that now pip commands generate errors like the following one which was show when I ran 'pip --version'.

Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==21.0', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax


Based on web searches I seem to have the pip syntax right.

Could someone please clarify my mistake?

Thank you.latest?d=yIl2AUoC8zA latest?i=dh6x7821VgU:v_A8m52vJYE:F7zBnMy latest?i=dh6x7821VgU:v_A8m52vJYE:V_sGLiP latest?d=qj6IDK7rITs latest?i=dh6x7821VgU:v_A8m52vJYE:gIN9vFwdh6x7821VgU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments