You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support python 3.12 -> PEP 632, Remove the distutils package. #696
I have searched the issues of this repo and believe that this is not a duplicate.
OS version and name: bullseye
Pendulum version: pendulum==2.1.2
Issue
× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "/tmp/pip-install-wpyylaf5/pendulum_41fb4accb1eb497eb3f79d80659881b4/build.py", line 5, in <module>
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/local/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 "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 56, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 85, in make_in
wb.build(target_dir=directory)
File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 120, in build
self._build(zip_file)
File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 169, in _build
self._run_build_script(self._package.build_script)
File "/tmp/pip-build-env-iee1xdz5/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 229, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "/usr/local/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python3', 'build.py']' returned non-zero exit status 1.
[end of output]
Any workaround for this? It also doesn't work with latest python 3.10.10 for me in a venv on Debian bullseye. I tried to work around, eventually gave up and copied the installed package across from another system!
We are currently working towards releasing Pendulum 3.0, which will address this issue.
Reacted by raphaelauv, David Andreoletti, Carlos, OleguerG, Edgar Ramírez Mondragón, Robert Frazier, Alejandro Angulo, NoahELE, Lou Luna Streit and Jeff Hale
thanks a stack for your work on Pendulum. We are running into the same issue on Python 3.12 at https://github.com/panodata/aika.
We see it already has been fixed on the main branch, so may we humbly ask for a new release? There is no pressure though, Python 3.12 will only be released on 2023-10-02, so there are a few weeks left to support it properly.
With kind regards,
Andreas.
Reacted by Edgar Ramírez Mondragón, René Kijewski, Robert Barrette, Alejandro Angulo, Irina Truong, Lou Luna Streit and Sören Sprößig
The error in pendulum still occurs after Python 3.12 has been released.
Here's the error message for your reference.
pip install pendulum
Collecting pendulum
Using cached pendulum-2.1.2.tar.gz (81 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting python-dateutil<3.0,>=2.6 (from pendulum)
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytzdata>=2020.1 (from pendulum)
Using cached pytzdata-2020.1-py2.py3-none-any.whl (489 kB)
Collecting six>=1.5 (from python-dateutil<3.0,>=2.6->pendulum)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pendulum
Building wheel for pendulum (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-install-_095_z76/pendulum_7c7e5588adb64891ac55f26a7321c809/build.py", line 5, in <module>
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "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 "lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 87, in make_in
wb.build(target_dir=directory)
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 122, in build
self._build(zip_file)
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 171, in _build
self._run_build_script(self._package.build_script)
File "/private/var/folders/00/d8c5mq757qsd67rc5vdjzxfh0000gn/T/pip-build-env-a1sh4src/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 231, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File ".pyenv/versions/3.12.0/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python3', 'build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pendulum
Failed to build pendulum
Thanks @edgarrmondragon . My transitive dependency had constrained the pendulum releases to exclude v3. I was able to widen the constraints and the project now installs correctly for Python 3.12 using pendulum 3.0.0b1.
Reacted by Edgar Ramírez Mondragón and TitanFighter
does not appear to be resolved with latest 3.0.0 build.
Building wheels for collected packages: pendulum
Building wheel for pendulum (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Temp\pip-install-x5n1poc2\pendulum_14453bd4c39946d08bed23215a926a89\build.py", line 5, in
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 58, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 123, in build
self._build(zip_file)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 266, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Users/mcb1456/AppData/Local/Programs/Python/Python312/python.exe', 'build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pendulum
Failed to build pendulum
Activity
sswam commentedon Mar 31, 2023
Any workaround for this? It also doesn't work with latest python 3.10.10 for me in a venv on Debian bullseye. I tried to work around, eventually gave up and copied the installed package across from another system!
Secrus commentedon May 8, 2023
We are currently working towards releasing Pendulum 3.0, which will address this issue.
OleguerG commentedon Jun 22, 2023
Any idea on when Pendulum 3.0 will be released?
LecrisUT commentedon Jul 21, 2023
Could you please add the 3.12 CI tests to
main? Currently this is blocking a few packages in Fedora due to dependency chainedgarrmondragon commentedon Aug 9, 2023
@LecrisUT see #728
amotl commentedon Aug 23, 2023
Dear Sébastien,
thanks a stack for your work on Pendulum. We are running into the same issue on Python 3.12 at https://github.com/panodata/aika.
We see it already has been fixed on the main branch, so may we humbly ask for a new release? There is no pressure though, Python 3.12 will only be released on 2023-10-02, so there are a few weeks left to support it properly.
With kind regards,
Andreas.
tharwan commentedon Oct 13, 2023
Is there a plan to release a fixed version?
blueskyjunkie commentedon Oct 28, 2023
The error in pendulum still occurs after Python 3.12 has been released.
Here's the error message for your reference.
edgarrmondragon commentedon Oct 29, 2023
@blueskyjunkie have you tried the
3.0.0b1release?blueskyjunkie commentedon Oct 30, 2023
Thanks @edgarrmondragon . My transitive dependency had constrained the pendulum releases to exclude v3. I was able to widen the constraints and the project now installs correctly for Python 3.12 using pendulum 3.0.0b1.
andreas-vester commentedon Nov 29, 2023
I can confirm that
pendulum 3.0.0b1can be installed withPython 3.12.Secrus commentedon Dec 17, 2023
Pendulum 3.0 was released, removing the dependency on distutils
jasttfan commentedon Dec 19, 2023
does not appear to be resolved with latest 3.0.0 build.
Building wheels for collected packages: pendulum
Building wheel for pendulum (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pendulum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Temp\pip-install-x5n1poc2\pendulum_14453bd4c39946d08bed23215a926a89\build.py", line 5, in
from distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 58, in build_wheel
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 123, in build
self._build(zip_file)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "C:\Users\mcb1456\AppData\Local\Temp\pip-build-env-3uu84twf\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 266, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "C:\Users\mcb1456\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Users/mcb1456/AppData/Local/Programs/Python/Python312/python.exe', 'build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pendulum
Failed to build pendulum
Bump pendulum for Python 3.12 compatibility
Bump pendulum for Python 3.12 compatibility