Skip to content

Install fails with "ModuleNotFoundError: No module named 'imp'" #68

Open
@T313C0mun1s7

Description

@T313C0mun1s7

Describe the bug

Python 3.12+ is currently unsupported, trying to install tl will result in an error due to missing the imp module.

Expected Behavior

Install successfully with no error.

Current Behavior

Install will produce an error that says:

ModuleNotFoundError: No module named 'imp'

According to the Python documentation, imp was deprecated in Python 3.4, and removed in 3.12.

Steps to Reproduce

  1. Install Python 3.12.x
  2. Install tl with pipx install tl or pip install tl

Logs

❯ cat /root/.local/state/pipx/log/cmd_2025-01-04_10.54.09_pip_errors.log
PIP STDOUT
----------
Collecting tl
  Using cached tl-0.5.tar.gz (1.2 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "/root/.local/share/pipx/shared/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/.local/share/pipx/shared/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/root/.local/share/pipx/shared/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-7isk7fjs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-7isk7fjs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-7isk7fjs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-7isk7fjs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 53, in <module>
        File "/tmp/pip-install-0d6ir6uc/tl_0c227157fc1742d593b7b7e38edeb694/tl/__init__.py", line 10, in <module>
          import imp
      ModuleNotFoundError: No module named 'imp'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Context (Environment)

  • OS: Linux (Nobara 41)
  • toolong Version: 1.4.0
  • Python Version: 3.12.3

Please Note: I am not a developer and don't really know what I am doing. I am posting this bug report using a similar one I found on another project as a template. So if you have any question or need anything, please provide explicit instructions to me on how to get the information you need so that I may properly report back to you in a useful way. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions