pssh (parallel-ssh) problems on Debian 10 with Python 3.7

Python reminds me of PHP many years ago with totally incompatible versioning on one server. Do you need another version? The best way - new servers, because any update or installation can break all global environments. Half a year after “Sunsetting Python 2” but main distributions continue to push python2 during installation and it’s a big challenge not to replace the default version after some update or installing a new package.

What happened? For debugging purposes I decided to try pssh (now parallel-ssh WTF?) on Debian 10 with Python 3.7. And what do I see? Debian as always can’t collect all needed dependencies for deb packages… After installation - time to fix bug's:

server:~$ parallel-ssh --version
Traceback (most recent call last):
  File "/usr/bin/parallel-ssh", line 26, in 
    from psshlib.cli import common_parser, common_defaults
  File "/usr/local/lib/python3.7/dist-packages/psshlib/", line 9, in 
    import version
ModuleNotFoundError: No module named 'version'

server:~$ diff /usr/local/lib/python3.7/dist-packages/psshlib/ /usr/local/lib/python3.7/dist-packages/psshlib/cli.py_orig
< from psshlib import version
> import version

server:~$ parallel-ssh -i -h ~/.pssh_hosts_files -p 10 hostname
Traceback (most recent call last):
  File "/usr/bin/parallel-ssh", line 118, in 
    do_pssh(hosts, cmdline, opts)
  File "/usr/bin/parallel-ssh", line 71, in do_pssh
    manager = Manager(opts)
  File "/usr/local/lib/python3.7/dist-packages/psshlib/", line 42, in __init__
    self.iomap = IOMap()
  File "/usr/local/lib/python3.7/dist-packages/psshlib/", line 215, in __init__
ValueError: the fd 4 must be in non-blocking mode

server:~$ diff /usr/local/lib/python3.7/dist-packages/psshlib/ /usr/local/lib/python3.7/dist-packages/psshlib/manager.py_orig
< import fcntl
<         fcntl.fcntl(wakeup_writefd, fcntl.F_SETFL, os.O_NONBLOCK)

You must be happy after the python upgrade! Shut up and smile!


Popular posts from this blog

FreeRadius and Google Workspace LDAP