magmax / python-inquirer

A collection of common interactive command line user interfaces, based on Inquirer.js (https://github.com/SBoudrias/Inquirer.js/)
MIT License
1.01k stars 97 forks source link

`distutils` package is removed in python version 3.12.0 #496

Closed sayeed205 closed 9 months ago

sayeed205 commented 10 months ago

in python version 3.12.0 I can no longer use inquirer as inquirer is depended on distutils standard library that is removed on python version 3.12.0.

I know I can downgrade the python version but that's not suitable for me.

Here is my console output

Traceback (most recent call last):
  File "D:\xxx\xxxx\main.py", line 4, in <module>
    import inquirer
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\inquirer\__init__.py", line 1, in <module>
    from inquirer.prompt import prompt
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\inquirer\prompt.py", line 2, in <module>
    from inquirer.render.console import ConsoleRender
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\inquirer\render\__init__.py", line 1, in <module>
    from inquirer.render.console import ConsoleRender
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\inquirer\render\console\__init__.py", line 10, in <module>
    from inquirer.render.console._editor import Editor
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\inquirer\render\console\_editor.py", line 1, in <module>
    import editor
  File "C:\Users\xxxx\scoop\apps\python\current\Lib\site-packages\editor.py", line 11, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils'

here is the reference link to the removal for the package - link

Cube707 commented 10 months ago

Hello, python 3.12 is not jet officially supported or tested. But this is still a good info.

I would expect setuptools to hold the dependency though? I will have to test if a simple lockfile update will suffice...

Cube707 commented 10 months ago

this was actually a upstream issue in the python-editor library. That lib is old an seems no longer maintained, so I switched to a different lib.

Should be fixed via the linked PR

sayeed205 commented 9 months ago

Yay thanks @Cube707