Open dev-SR opened 2 years ago
Getting the same error
Traceback (most recent call last): File "C:\Users\sulta\Desktop\mon\cli-test2.py", line 2, in
from PyInquirer import prompt, print_json File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInquirer__init.py", line 6, in from prompt_toolkit.token import Token File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit__init__.py", line 16, in init__.py)from .interface import CommandLineInterface File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\interface.py", line 19, in from .application import Application, AbortAction File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\application.py", line 8, in from .key_binding.bindings.basic import load_basic_bindings File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\key_binding\bindings\basic.py", line 9, in from prompt_toolkit.renderer import HeightIsUnknownError File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\renderer.py", line 11, in from prompt_toolkit.styles import Style File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\styles__init__.py", line 8, in from .from_dict import * File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\styles\from_dict.py", line 9, in from collections import Mapping ImportError: cannot import name 'Mapping' from 'collections' (C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\collections\
Getting the same error
Traceback (most recent call last):
File "d:\python-proj\test.py", line 2, in
Temp. solution is to downgrade your python version to the correct one.
Edit: Python 3.7 is working well.
For Python 3.10.5, change line in file: ...\.venv\Lib\site-packages\prompt_toolkit\styles\from_dict.py
from:
from collections import Mapping
to from collections.abc import Mapping
.
Such modifications are meaningless, and it is impossible to manually modify each node during automated deployment
I completely agree with @minidarkmimi
It is not elegant or feasible in some cases to update site-packages and change the installed code to make it all work.
The latest commit on the Repo works and just needs to be updated on PyPi. Workaround: Install from Github directly instead of PyPi.
In my case I added this directly in setup.py as a requirement for my own library.
'pyInquirer @ git+https://github.com/CITGuru/PyInquirer.git#7637373429bec66788650cda8091b7a6f12929ee'
Is there a release for this inbound yet? I just installed recently and still have the issue.
Traceback (most recent call last):