pendulum: ERROR: Failed building wheel for pendulum

  • I am on the latest Pendulum version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS version and name: Windows 10
  • Pendulum version: 2.1.0

Issue

Python: Python 3.8.2 PIP: pip 20.0.2

I am encountering an error installing Python Twitch IRC:

pip install python-twitch-irc

Full error message:

Collecting python-twitch-irc
  Using cached python_twitch_irc-1.1.0-py3-none-any.whl (6.2 kB)
Collecting pendulum
  Using cached pendulum-2.1.0.tar.gz (80 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pydle
  Using cached pydle-0.9.3-py3-none-any.whl (43 kB)
Collecting python-dateutil<3.0,>=2.6
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting pytzdata>=2018.3
  Using cached pytzdata-2019.3-py2.py3-none-any.whl (489 kB)
Requirement already satisfied: six>=1.5 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum->python-twitch-irc) (1.14.0)
Building wheels for collected packages: pendulum
  Building wheel for pendulum (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\nigel\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\nigel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\nigel\AppData\Local\Temp\tmph3lnsr6j'
       cwd: C:\Users\nigel\AppData\Local\Temp\pip-install-vj7m5mv2\pendulum
  Complete output (24 lines):
  Traceback (most recent call last):
    File "setup.py", line 2, in <module>
      from setuptools import setup
  ModuleNotFoundError: No module named 'setuptools'
  Traceback (most recent call last):
    File "C:\Users\nigel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_vendor\pep517\_in_process.py", line 257, in <module>
      main()
    File "C:\Users\nigel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_vendor\pep517\_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\nigel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_vendor\pep517\_in_process.py", line 181, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-6ft1gs0c\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 57, in build_wheel
      return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-6ft1gs0c\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 56, in make_in
      wb.build()
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-6ft1gs0c\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 82, in build
      self._build(zip_file)
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-6ft1gs0c\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 102, in _build
      self._run_build_command(setup)
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-6ft1gs0c\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 130, in _run_build_command
      subprocess.check_call(
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['C:\\Users\\nigel\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\python.exe', 'setup.py', 'build', '-b', 'build']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for pendulum
Failed to build pendulum
ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly

Projects are up-to-date:

Command:

python -m pip install --upgrade pip setuptools wheel

Output:

Requirement already up-to-date: pip in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (20.0.2)
Requirement already up-to-date: setuptools in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (46.1.3)
Requirement already up-to-date: wheel in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (0.34.2)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 24
  • Comments: 23 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Happening again with python 3.12.0 and poetry 1.7.1

> poetry add pendulum
Using version ^2.1.2 for pendulum

Updating dependencies
Resolving dependencies... (0.2s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing pendulum (2.1.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  Traceback (most recent call last):
    File "/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmpy2hmfpgx/pendulum-2.1.2/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 "/Users/anttiheikkila/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/anttiheikkila/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/anttiheikkila/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/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/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
      self._build(zip_file)
    File "/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
      self._run_build_script(self._package.build_script)
    File "/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 266, in _run_build_script
      subprocess.check_call([self.executable.as_posix(), build_script])
    File "/usr/local/Cellar/python@3.12/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/private/var/folders/mr/7klj_v012p15b8r1y3nz0_p40000gp/T/tmp7i58ygn9/.venv/bin/python', 'build.py']' returned non-zero exit status 1.
  

  at ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pendulum (2.1.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pendulum (==2.1.2)"'.

@SriZbi84 one quick way to solve is , use forced previous version which is not using PEP517 req, try to use pip install pendulum==2.0.5 before install pip install python-twitch-irc which may solve the issue

Just hit this with pendulum 2.1.1 on mac 10.13

I went back even further in the pendulum release history, and found that it works with pendulum 2.0.3.

Command:

pip install pendulum==2.0.3

Output:

Collecting pendulum==2.0.3
  Downloading pendulum-2.0.3.tar.gz (75 kB)
     |████████████████████████████████| 75 kB 682 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pytzdata>=2018.3
  Using cached pytzdata-2019.3-py2.py3-none-any.whl (489 kB)
Collecting python-dateutil<3.0,>=2.6
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Requirement already satisfied: six>=1.5 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum==2.0.3) (1.14.0)
Building wheels for collected packages: pendulum
  Building wheel for pendulum (PEP 517) ... done
  Created wheel for pendulum: filename=pendulum-2.0.3-cp38-cp38-win_amd64.whl size=94032 sha256=76e86d9c1f0567ef6eaffdd1b2769b41c8f2f10f2ce5fae3d157f8fdfa45e23b
  Stored in directory: c:\users\nigel\appdata\local\pip\cache\wheels\ac\ae\5a\b75aa12253329ab13edbeea04c4f1bcc61d0fb59ce88b7017a
Successfully built pendulum
Installing collected packages: pytzdata, python-dateutil, pendulum
Successfully installed pendulum-2.0.3 python-dateutil-2.8.1 pytzdata-2019.3

I then installed Twitch IRC.

Command:

pip install python-twitch-irc

Output:

Collecting python-twitch-irc
  Using cached python_twitch_irc-1.1.0-py3-none-any.whl (6.2 kB)
Collecting pydle
  Using cached pydle-0.9.3-py3-none-any.whl (43 kB)
Requirement already satisfied: pendulum in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-twitch-irc) (2.0.3)
Requirement already satisfied: pytzdata>=2018.3 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pendulum->python-twitch-irc) (2019.3)
Requirement already satisfied: python-dateutil<3.0,>=2.6 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pendulum->python-twitch-irc) (2.8.1)
Requirement already satisfied: six>=1.5 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum->python-twitch-irc) (1.14.0)
Installing collected packages: pydle, python-twitch-irc
Successfully installed pydle-0.9.3 python-twitch-irc-1.1.0

Up.

Pendulum has been migrated from Travis CI to Github Actions, many scripts changed: https://github.com/sdispater/pendulum/compare/2.0.5...2.1.0

I think the trouble in .github/workflows/release.yml.

@sdispater can you check please?

Same issue happens for an arm based computer

I had problem yesterday too but today everything is ok again.

I just got this error with 2.1.1, but it works fine with 2.1.0. Not sure what’s going on.

I went back even further in the pendulum release history, and found that it works with pendulum 2.0.3.

Command:

pip install pendulum==2.0.3

Output:

Collecting pendulum==2.0.3
  Downloading pendulum-2.0.3.tar.gz (75 kB)
     |████████████████████████████████| 75 kB 682 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pytzdata>=2018.3
  Using cached pytzdata-2019.3-py2.py3-none-any.whl (489 kB)
Collecting python-dateutil<3.0,>=2.6
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Requirement already satisfied: six>=1.5 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum==2.0.3) (1.14.0)
Building wheels for collected packages: pendulum
  Building wheel for pendulum (PEP 517) ... done
  Created wheel for pendulum: filename=pendulum-2.0.3-cp38-cp38-win_amd64.whl size=94032 sha256=76e86d9c1f0567ef6eaffdd1b2769b41c8f2f10f2ce5fae3d157f8fdfa45e23b
  Stored in directory: c:\users\nigel\appdata\local\pip\cache\wheels\ac\ae\5a\b75aa12253329ab13edbeea04c4f1bcc61d0fb59ce88b7017a
Successfully built pendulum
Installing collected packages: pytzdata, python-dateutil, pendulum
Successfully installed pendulum-2.0.3 python-dateutil-2.8.1 pytzdata-2019.3

I then installed Twitch IRC.

Command:

pip install python-twitch-irc

Output:

Collecting python-twitch-irc
  Using cached python_twitch_irc-1.1.0-py3-none-any.whl (6.2 kB)
Collecting pydle
  Using cached pydle-0.9.3-py3-none-any.whl (43 kB)
Requirement already satisfied: pendulum in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-twitch-irc) (2.0.3)
Requirement already satisfied: pytzdata>=2018.3 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pendulum->python-twitch-irc) (2019.3)
Requirement already satisfied: python-dateutil<3.0,>=2.6 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pendulum->python-twitch-irc) (2.8.1)
Requirement already satisfied: six>=1.5 in c:\users\nigel\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum->python-twitch-irc) (1.14.0)
Installing collected packages: pydle, python-twitch-irc
Successfully installed pydle-0.9.3 python-twitch-irc-1.1.0

Thank you, solved my problem.

Also seeing this with Python Alpine:

FROM python:3.7.4-alpine