Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks in Python 3.12 due to dependency on distutils #278

Closed
philer opened this issue Dec 14, 2023 · 1 comment
Closed

Breaks in Python 3.12 due to dependency on distutils #278

philer opened this issue Dec 14, 2023 · 1 comment

Comments

@philer
Copy link

philer commented Dec 14, 2023

distutils from the standard library was deprecated in 3.10 (PEP 632) and removed in 3.12. It is still available on many systems as it is included with setuptools but if this is not installed, running udiskie yields the following error:

ModuleNotFoundError: No module named 'distutils'

Full stack trace:

Traceback (most recent call last):
  File "/home/***/.local/bin/udiskie", line 5, in <module>
    from udiskie.cli import Daemon
  File "/home/***/.local/lib/python3.12/site-packages/udiskie/cli.py", line 21, in <module>
    import udiskie.mount
  File "/home/***/.local/lib/python3.12/site-packages/udiskie/mount.py", line 5, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils'

I installed udiskie via pip on Linux Mint 21.2 with Python 3.12.1 installed manually via make altinstall.

$ pip --version
pip 23.3.1 from /home/***/.local/lib/python3.12/site-packages/pip (python 3.12)
@coldfix
Copy link
Owner

coldfix commented Dec 17, 2023

Hi, thanks! Will be fixed in next release. Until then, please install setuptools.

coldfix added a commit that referenced this issue Jan 26, 2024
- drop external dependency on distutils (#278)
- rename ``--notify-command`` to ``--event-hook`` to prevent misunderstandings (#279)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants