Problem with pip and Python-related applications

Hi,

I’m not familiar with Pip and anything Python-related. But things don’t seem to work as expected on my OpenSUSE Leap 15.2 workstation.

For example I tried to install Sphinx (a documentation generator), and here’s what I get.

# pip install sphinx 
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 484, 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 2725, in load_entry_point 
    return ep.load() 
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2343, in load 
    return self.resolve() 
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, 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'

It also looks like other Python-based applications have stopped working. For example the speedtest tool:

$ speedtest 
Retrieving speedtest.net configuration... 
Traceback (most recent call last): 
  File "/usr/lib/python3.6/site-packages/speedtest.py", line 1401, in shell 
    speedtest = Speedtest() 
  File "/usr/lib/python3.6/site-packages/speedtest.py", line 743, in __init__ 
    self.get_config() 
  File "/usr/lib/python3.6/site-packages/speedtest.py", line 799, in get_config 
    map(int, server_config'ignoreids'].split(',')) 
ValueError: invalid literal for int() with base 10: '' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
  File "/usr/bin/speedtest", line 11, in <module> 
    load_entry_point('speedtest-cli==1.0.7', 'console_scripts', 'speedtest')() 
  File "/usr/lib/python3.6/site-packages/speedtest.py", line 1498, in main 
    shell() 
  File "/usr/lib/python3.6/site-packages/speedtest.py", line 1402, in shell 
    except (ConfigRetrievalError, HTTP_ERRORS): 
TypeError: catching classes that do not inherit from BaseException is not allowed

This has worked perfectly until a couple of weeks ago.

Any idea what I can do to remedy this?

May be an issue with the standard Leap 15.2 build for the package – <https://build.opensuse.org/package/show/openSUSE:Leap:15.2/python-pip>.
On the other hand, there is a newer version available from the “devel:languages:python” repository – <https://software.opensuse.org/package/python-pip> –

You will probably have to move all your Python tools over to the packages available from the “devel:languages:python” repository.

  • If you could also, please, raise an openSUSE Bug Report to document the breakage of the standard Python tools packages – <https://bugzilla.opensuse.org/index.cgi> – same login as the one you use for this Forum.