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

ERROR: Failed building wheel for pendulum #457

Closed
2 tasks done
Srizbi84 opened this issue Apr 1, 2020 · 23 comments · Fixed by #488 or #489
Closed
2 tasks done

ERROR: Failed building wheel for pendulum #457

Srizbi84 opened this issue Apr 1, 2020 · 23 comments · Fixed by #488 or #489

Comments

@Srizbi84
Copy link

Srizbi84 commented Apr 1, 2020

  • 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)
@jinesh90
Copy link

jinesh90 commented Apr 1, 2020

I am also facing the same issue with following error and environment.
Python: 2.7
PIP: 20.0.2

Building wheels for collected packages: pendulum
--
303 | Building wheel for pendulum (PEP 517): started
304 | Building wheel for pendulum (PEP 517): finished with status 'error'
305 | ERROR: Command errored out with exit status 1:
306 | command: /usr/local/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpLJ5u2u
307 | cwd: /tmp/pip-install-_6Mm2s/pendulum
308 | Complete output (24 lines):
309 | Traceback (most recent call last):
310 | File "setup.py", line 2, in <module>
311 | from setuptools import setup
312 | ImportError: No module named setuptools
313 | Traceback (most recent call last):
314 | File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
315 | main()
316 | File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
317 | json_out['return_val'] = hook(**hook_input['kwargs'])
318 | File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 182, in build_wheel
319 | metadata_directory)
320 | File "/tmp/pip-build-env-fp7gtG/overlay/lib/python2.7/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
321 | return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
322 | File "/tmp/pip-build-env-fp7gtG/overlay/lib/python2.7/site-packages/poetry/core/masonry/builders/wheel.py", line 56, in make_in
323 | wb.build()
324 | File "/tmp/pip-build-env-fp7gtG/overlay/lib/python2.7/site-packages/poetry/core/masonry/builders/wheel.py", line 82, in build
325 | self._build(zip_file)
326 | File "/tmp/pip-build-env-fp7gtG/overlay/lib/python2.7/site-packages/poetry/core/masonry/builders/wheel.py", line 102, in _build
327 | self._run_build_command(setup)
328 | File "/tmp/pip-build-env-fp7gtG/overlay/lib/python2.7/site-packages/poetry/core/masonry/builders/wheel.py", line 131, in _run_build_command
329 | [sys.executable, str(setup), "build", "-b", str(self._path / "build")]
330 | File "/usr/local/lib/python2.7/subprocess.py", line 190, in check_call
331 | raise CalledProcessError(retcode, cmd)
332 | subprocess.CalledProcessError: Command '['/usr/local/bin/python', 'setup.py', u'build', u'-b', 'build']' returned non-zero exit status 1
333 | ----------------------------------------
334 | ERROR: Failed building wheel for pendulum
335 | Failed to build pendulum
336 | ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly

@jinesh90
Copy link

jinesh90 commented Apr 1, 2020

@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

@Srizbi84
Copy link
Author

Srizbi84 commented Apr 2, 2020

@jinesh90 Thanks for the suggestion. I tried it, but I still get an error.

pip install pendulum==2.0.5
Collecting pendulum==2.0.5
  Using cached pendulum-2.0.5.tar.gz (77 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
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==2.0.5) (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\tmphy_o8ame'
       cwd: C:\Users\nigel\AppData\Local\Temp\pip-install-jfi3miab\pendulum
  Complete output (33 lines):
  Traceback (most recent call last):
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\utils\env.py", line 889, in _run
      output = subprocess.check_output(
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\utils\_compat.py", line 205, in run
      raise CalledProcessError(
  poetry.utils._compat.CalledProcessError: Command '['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\\python.exe', 'setup.py', 'build', '-b', 'build']' returned non-zero exit status 1.

  During handling of the above exception, another exception occurred:

  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-dx6btxsa\overlay\Lib\site-packages\poetry\masonry\api.py", line 62, in build_wheel
      WheelBuilder.make_in(
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\masonry\builders\wheel.py", line 55, in make_in
      wb.build()
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\masonry\builders\wheel.py", line 81, in build
      self._build(zip_file)
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\masonry\builders\wheel.py", line 103, in _build
      self._env.run(
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\utils\env.py", line 856, in run
      return self._run(cmd, **kwargs)
    File "C:\Users\nigel\AppData\Local\Temp\pip-build-env-dx6btxsa\overlay\Lib\site-packages\poetry\utils\env.py", line 893, in _run
      raise EnvCommandError(e, input=input_)
  poetry.utils.env.EnvCommandError: Command ['C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\\python.exe', 'setup.py', 'build', '-b', 'build'] errored with the following return code 1, and output:
  Access is denied.

  ----------------------------------------
  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

@Srizbi84
Copy link
Author

Srizbi84 commented Apr 2, 2020

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

@softwarebloat
Copy link

Hi everybody,
same issue here. I don't use python-twitch-irc but have same error when building wheel with pendulum 2.1.
Downgrade to 2.0.4 seems to solve but i'd like to use v 2.1 😬

@altendky
Copy link
Contributor

altendky commented Apr 2, 2020

See #454. I'm guessing you have 32-bit python thus not getting the pendulum wheels (only built for win_amd64 :[ ).

@altendky
Copy link
Contributor

altendky commented Apr 2, 2020

Or even on 32-bit... #456

@lithammer
Copy link

There's no manylinux wheel for Python 2.7, only for macOS and Windows. I'm quite sure it existed before though 🤔

@mrinehart-r7
Copy link

I'm also being affected by this. My solution was to use older wheels, but it's not a great solution. Some other modules (requests) that depend on this are also breaking because of it.

@Saragon4005
Copy link

Same issue happens for an arm based computer

@chriszacny
Copy link

Also seeing this with Python Alpine:

FROM python:3.7.4-alpine

@uburuntu
Copy link

uburuntu commented May 3, 2020

Up.

Pendulum has been migrated from Travis CI to Github Actions, many scripts changed:
2.0.5...2.1.0

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

@sdispater can you check please?

@sandys
Copy link

sandys commented May 21, 2020

hi guys any update here ?

@oliaraujo
Copy link

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.

Wooble added a commit to pitthsls/pycounter that referenced this issue Jul 8, 2020
probably related to python-pendulum/pendulum#457

pendulum is shipping wheels for py3.8 with the binary tag wrong,
which is breaking install on Windows.

Might just go back to using Arrow instead of Pendulum, but for now
move to an old version of Pendulum, I guess.
@katylava
Copy link

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

@martsa1
Copy link

martsa1 commented Jul 15, 2020

Just hit this with pendulum 2.1.1 on mac 10.13

@StephenBrown2
Copy link

Same with MacOS 10.14.6. pendulum 2.1.0 installs fine using poetry, 2.1.1 does not.

friek added a commit to friek/landis-reader that referenced this issue Jul 27, 2020
All changes:
- Pendulum 2.1.x doesn't appear to build on raspberry pi, so downgraded
  to 2.0.5. See also python-pendulum/pendulum#457
- Added restart: always to docker-compose.yml.
@gsemet
Copy link

gsemet commented Sep 30, 2020

I had to revert to 2.1.0 the build suddently stopped working today ! For unknown reason, I was using 2.1.2 since a few weeks, but on builds today (nothing change in my pipenv's lockfiles) the build failed on mac !!

@Bernardoow
Copy link

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

@gsemet
Copy link

gsemet commented Oct 1, 2020

any idea who is the culprit ?

@jcushman
Copy link

jcushman commented Dec 7, 2020

I was able to fix this problem for python-hyperscan by adding "setuptools" to [build-system] in pyproject.toml. Looks like this project has the same setup and adding that might fix it -- seems to only pop up with some combination of versions but I haven't figured out what.

(I found this thread while debugging that issue -- dropping this note here in case it helps.)

@mutiev
Copy link

mutiev commented Sep 7, 2022

image

I have the same issue with pendulum installation

ModuleNotFoundError: No module named 'setuptools'

@antti-ngp
Copy link

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/[email protected]/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)"'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet