SUSE Support

Here When You Need Us

pip commands fail with ImportError cannot import name 'FormatControl'

This document (000019821) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 GA

Situation

Pip commands fail with ImporetError FormatControl:
pip list --uptodate  
Traceback (most recent call last):
 File "/usr/bin/pip", line 11, in <module>
   load_entry_point('pip==10.0.1', 'console_scripts', 'pip3.6')()
 File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point
   return get_distribution(dist).load_entry_point(group, name)
 File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
   return ep.load()
 File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2408, in load
   return self.resolve()
 File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2414, in resolve
   module = __import__(self.module_name, fromlist=['__name__'], level=0)
 File "/usr/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
   from pip._internal import cmdoptions
 File "/usr/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
   from pip._internal.index import (
ImportError: cannot import name 'FormatControl'


 

Resolution

Removing pip obstacles from higher version and reinstall python-pip3:

rm -rf /usr/lib/python3.6/site-packages/pip-20.*
zypper in --force python-pip3


 

Cause

Running a pip command shows that there is a newer version available by upstream:
pip list --uptodate                           
Package         Version
--------------- -------
...
You are using pip version 10.0.1, however version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.   


Running that command will work but should not be done, as next zypper update will apply based on previous version installed by zypper.

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019821
  • Creation Date: 08-Jan-2021
  • Modified Date:26-Jan-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.