I'm trying to use pip
to install python packages on an RHEL instance but get this error when I try to run any pip command.
Pip did previously work but all of a sudden (not sure what I did) it started to fail like this.
[root@universe: ~]# pip --version
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==18.1', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 378, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2566, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2260, in load
File "/usr/lib/python2.6/site-packages/pip-18.1-py2.6.egg/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python2.6/site-packages/pip-18.1-py2.6.egg/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python2.6/site-packages/pip-18.1-py2.6.egg/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python2.6/site-packages/pip-18.1-py2.6.egg/pip/_internal/cli/cmdoptions.py", line 75
binary_only = FormatControl(set(), {':all:'})
^
SyntaxError: invalid syntax
[root@universe: ~]#
I have tried to reinstall pip which comes up with an error saying the dependency python-setuptools
is missing
[root@universe: ~]# yum install python-pip
Loaded plugins: product-id, rhnplugin, security, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error Message:
Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
An error has occurred while processing your request. If this problem
persists please enter a bug report at bugzilla.redhat.com.
If you choose to submit the bug report, please be sure to include
details of what you were trying to do when this error occurred and
details on how to reproduce this problem.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-pip.noarch 0:7.1.0-1.el6 will be installed
--> Processing Dependency: python-setuptools for package: python-pip-7.1.0-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: python-pip-7.1.0-1.el6.noarch (epel)
Requires: python-setuptools
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@universe: ~]#
Trying to install python-setuptools
shows the message no package found
[root@universe: ~]# yum install python-setuptools
Loaded plugins: product-id, rhnplugin, security, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error Message:
Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
An error has occurred while processing your request. If this problem
persists please enter a bug report at bugzilla.redhat.com.
If you choose to submit the bug report, please be sure to include
details of what you were trying to do when this error occurred and
details on how to reproduce this problem.
Setting up Install Process
No package python-setuptools available.
Error: Nothing to do
[root@universe: ~]#