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

No module named 'distutils' in Py12 #160

Open
stav opened this issue Jan 5, 2025 · 1 comment
Open

No module named 'distutils' in Py12 #160

stav opened this issue Jan 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@stav
Copy link

stav commented Jan 5, 2025

What's the bug all about?

ModuleNotFoundError: No module named 'distutils'

What snippet/command led to this issue?

$ "pipupgrade"

Logs

Traceback (most recent call last):
  File "venv/bin/pipupgrade", line 5, in <module>
    from pipupgrade.__main__ import main
  File "venv/lib/python3.12/site-packages/pipupgrade/__init__.py", line 23, in <module>
    from pipupgrade.__main__    import main
  File "venv/lib/python3.12/site-packages/pipupgrade/__main__.py", line 5, in <module>
    from   pipupgrade.commands import command as main
  File "venv/lib/python3.12/site-packages/pipupgrade/commands/__init__.py", line 11, in <module>
    from pipupgrade.commands.helper import (
  File "venv/lib/python3.12/site-packages/pipupgrade/commands/helper.py", line 10, in <module>
    from pipupgrade.model               import Registry
  File "venv/lib/python3.12/site-packages/pipupgrade/model/__init__.py", line 3, in <module>
    from pipupgrade.model.package  import Package
  File "venv/lib/python3.12/site-packages/pipupgrade/model/package.py", line 11, in <module>
    from pipupgrade                     import _pip, semver
  File "venv/lib/python3.12/site-packages/pipupgrade/_pip.py", line 58, in <module>
    _PIP_EXECUTABLES = _get_pip_executable(multiple = True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv/lib/python3.12/site-packages/pipupgrade/_pip.py", line 43, in _get_pip_executable
    exec_ = which(pip_)
            ^^^^^^^^^^^
  File "venv/lib/python3.12/site-packages/bpyutils/util/system.py", line 79, in which
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils'
@stav stav added the bug Something isn't working label Jan 5, 2025
@stav
Copy link
Author

stav commented Jan 5, 2025

Installed setuptools:

$ pip install setuptools

Looking in indexes: https://pypi.org/simple, https://packagecloud.io/github/git-lfs/pypi/simple
Collecting setuptools
  Downloading setuptools-75.7.0-py3-none-any.whl.metadata (6.7 kB)
Downloading setuptools-75.7.0-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 4.5 MB/s eta 0:00:00
Installing collected packages: setuptools
Successfully installed setuptools-75.7.0

Now it works:

$ pipupgrade --check
Checking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants