Hi! I'm trying to use this wizard client on our Arch Linux servers which runs latest Python (3.11) and generally latest dependencies possible, but the tool appears to be dependent on an older Python version or an older library.
After installing PyInquirer and paramiko and running the script, I get this import error:
Traceback (most recent call last):
File "/usr/local/src/PUSH_Clients_Wizard/app.py", line 7, in <module>
from modules import _utils, manage_checks
File "/usr/local/src/PUSH_Clients_Wizard/modules/_utils.py", line 9, in <module>
from PyInquirer import prompt, Validator, ValidationError
File "/root/.local/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
from prompt_toolkit.token import Token
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
from .interface import CommandLineInterface
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/interface.py", line 19, in <module>
from .application import Application, AbortAction
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/application.py", line 8, in <module>
from .key_binding.bindings.basic import load_basic_bindings
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
from prompt_toolkit.renderer import HeightIsUnknownError
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
from prompt_toolkit.styles import Style
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
from .from_dict import *
File "/root/.local/lib/python3.11/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)
A quick Google search shows people saying that their script simply needs to be updated (I'm guessing prompt_toolkit
), or downgrade Python version: https://stackoverflow.com/a/70557518
Traceback (most recent call last):
File "/usr/local/src/PUSH_Clients_Wizard/app.py", line 7, in <module>
from modules import _utils, manage_checks
File "/usr/local/src/PUSH_Clients_Wizard/modules/_utils.py", line 9, in <module>
from PyInquirer import prompt, Validator, ValidationError
File "/root/.local/lib/python3.11/site-packages/PyInquirer/__init__.py", line 6, in <module>
from prompt_toolkit.token import Token
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3.11/site-packages/prompt_toolkit/token.py)
So in short, the tool needs to be updated to support newer Python versions which also includes updating the dependencies.