Menu

#24 Fails to install/compile with Python 3.12

closed
None
blocker
bug
2023-10-22
2023-10-04
Seb
No

I am trying to install ruamel via pdm using Python 3.12 but get the following C compilation error:

> pdm update
  Lock successful
Synchronizing working set with resolved packages: 1 to add, 0 to update, 0 to remove

  x Install ruamel-yaml-clib 0.2.7 failed
Retry failed jobs
  x Install ruamel-yaml-clib 0.2.7 failed

ERRORS:
add ruamel-yaml-clib failed:
Traceback (most recent call last):
  File "C:\python312\current\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pdm\installers\synchronizers.py", line 283, in install_candidate
    self.manager.install(can)
  File "C:\python312\current\Lib\site-packages\pdm\installers\manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
                  ^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pdm\models\candidates.py", line 395, in build
    self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pdm\builders\wheel.py", line 28, in build
    filename = self._hook.build_wheel(out_dir, config_settings, metadata_directory)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pyproject_hooks\_impl.py", line 209, in build_wheel
    return self._call_hook('build_wheel', {
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pyproject_hooks\_impl.py", line 311, in _call_hook
    self._subprocess_runner(
  File "C:\python312\current\Lib\site-packages\pdm\builders\base.py", line 260, in subprocess_runner
    return log_subprocessor(cmd, cwd, extra_environ=env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python312\current\Lib\site-packages\pdm\builders\base.py", line 107, in log_subprocessor
    raise build_error(e) from None
pdm.exceptions.BuildError: Build backend raised error: Showing the last 10 lines of the build output:
C:\python312\current\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
_ruamel_yaml.c(28553): error C2039: 'ob_digit': is not a member of '_longobject'
C:\python312\current\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
_ruamel_yaml.c(28732): error C2039: 'ob_digit': is not a member of '_longobject'
C:\python312\current\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
_ruamel_yaml.c(28787): error C2039: 'ob_digit': is not a member of '_longobject'
C:\python312\current\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
_ruamel_yaml.c(29276): error C2039: 'ob_digit': is not a member of '_longobject'
C:\python312\current\include\cpython/longintrepr.h(87): note: see declaration of '_longobject'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

See C:\Users\THINPE~1\AppData\Local\Temp\pdm-install-dztkwxhg.log for detailed debug log.
[InstallationError]: Some package operations are not complete yet
Add '-v' to see the detailed traceback

Discussion

  • Anthon van der Neut

    • status: open --> duplicate
     
  • Anthon van der Neut

    duplicate https://sourceforge.net/p/ruamel-yaml-clib/tickets/23/

    I have no idea what pdm is and why it doesn't take the latest version (which is 0.2.8)

     
  • Seb

    Seb - 2023-10-04

    For your reference: https://github.com/pdm-project/pdm/ "A modern Python package and dependency manager supporting the latest PEP standards."

     
    • Micah Ellison

      Micah Ellison - 2023-10-21

      This appears to relate to the "cross-platform lock file" feature of PDM. Since there aren't Windows wheels for 0.2.8 due to Appveyor not supporting that environment (#26), this feature would force it to use 0.2.7 by default.

       
  • Anthon van der Neut

    FWIW 4 days ago there was comment on appveyor that a new version (with Py312) would be up withing a week. I'll keep an eye on that and upload Windows Py12 version ASAP

     
  • Anthon van der Neut

    • status: duplicate --> closed
     
  • Anthon van der Neut

    the windows wheels have been uploaded for 3.12

     

Log in to post a comment.