Closed weskerfoot closed 4 years ago
My quick looking suggests...
1) It's Alpine so the pendulum
wheels aren't used so that explains the issue not being as wide spread as it might be
2) The poetry
tarball doesn't list setuptools
as an install_requires
and thus the isolated build env doesn't have setuptools (the poetry
.whl
should be used but I know where to look in the tarball...)
Now I'm not sure of the nuances here and I haven't tested my theory quite yet but... FWIW.
Workaround (for this situation, running in Docker with Alpine)
FROM python:3.7-alpine3.11
RUN apk update \
&& apk add gcc musl-dev python3-dev py3-setuptools libffi libffi-dev openssl-dev \
&& pip3 install poetry \
&& pip3 install --no-build-isolation pendulum==2.1.0
Any workarounds for people using pipenv? I'm using the same docker setup but using pipenv and lock files.
I'm having the same issue in the home assistant 107.7 (hassio)
Any workarounds for people using pipenv? I'm using the same docker setup but using pipenv and lock files.
Does pipenv have a similar option to disable build isolation? That would most likely work, though I'm not really familiar with how pipenv does things.
❯ colordiff pendulum-2.0.5/setup.py pendulum-2.1.0/setup.py
2c2
< from distutils.core import setup
---
> from setuptools import setup
Does anyone know where this setup.py
is being generated? It has changed in 2.1.0
https://files.pythonhosted.org/packages/e5/dc/d79687e49cafbdee73078b28c57d2a2555735c88d672239e4cb19a6a141a/pendulum-2.1.0.tar.gz
Poetry would be building it I would think. But, pyproject.toml
will get hit first (for 517-compatible pips) and that specifies poetry
as the build backend not setuptools
. And poetry
is missing an install_requires
for setuptools
afaict thus causing the error. So it seems to me that either that needs to be addressed or pendulum
needs to build a pyproject.toml
with a build-system
requires
including setuptools
and the corresponding build-backend
.
@davegallant, commit-wise it looks to be: https://github.com/python-poetry/poetry/commit/f759876231ca6c0910ad823f0ba405e21b3f1c4b
I just realized we don't have a full log here. @weskerfoot, could you add that?
@altendky done docker_build.log
Any update on the above issue?
I think python-poetry/core#24 (also mentioned at https://github.com/python-poetry/poetry/pull/2262/files/ad2c8d80f4f04a95769a5955e4367f1351aaca76#diff-d4e7f533c342aecaeb13b29ca6c1bf24) should resolve this. I have not tested at all, just getting the cross-references added.
Thanks @abn.
I was able to get this to work in my dockerfile by downgrading my version of pip. I didn't keep track of all the details, but it seems that up to about version 1.0.4 it works with pip 19.x. After that we get the issue listed above.
pip install pip==18.1
Please fix this issue, thanks
Why is poetry required to install pendulum?
Poetry is required to build pendulum. If you are on a system for which wheels (prebuilt packages) are not provided then it needs to be built from the source distribution. This can also happen if you tell pip not to use wheels. If you can and do use the wheels then poetry should not be required.
Windows: Install (python -m pip install pendulum) works on pip 18.1, doesnt work on pip 19.2.3.
Wasn't clear if you folks had the log you needed, so...
ERROR: Failed cleaning build dir for pendulum Failed to build pendulum ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly
Can confirm that I get the same error @enercalc is getting.
Pendulum 2.0.3 installs correctly.
Windows 10 :
I installed the PIP version 18.1 with the below command C:>pip install pip==18.1
Then Install the pendulum with the command: C:>pip install pendulum
No errors now
Poetry is required to build pendulum. If you are on a system for which wheels (prebuilt packages) are not provided then it needs to be built from the source distribution. This can also happen if you tell pip not to use wheels. If you can and do use the wheels then poetry should not be required.
To add to that, the reason it's an issue on Alpine is because Alpine doesn't have prebuilt wheels available (because it's using musl libc, so it needs to get recompiled for that), so you have to build them from source every time you install it.
To add to that, the reason it's an issue on Alpine is because Alpine doesn't have prebuilt wheels available (because it's using musl libc, so it needs to get recompiled for that), so you have to build them from source every time you install it.
We build wheels for Alpine and serve them via devpi so we don't have to have build tools in containers and such. And we still have problems building a wheel for Pendulum :)
Someone should fix this bug, it's been a couple months. i can not downgrade my pip, it will effect to other libraries. Right now i just mess up to my docker file in order to install poetry and pendulum directly into container. Its a bizarre solution :(
For pipenv users, this got my Pipfile with a pendulum dependency installing on Alpine:
FROM python:3.8-alpine
RUN apk update \
&& apk add --no-cache build-base postgresql-dev openssl-dev libffi-dev \
&& pip3 install -U pipenv poetry
WORKDIR /app
ENV WORKON_HOME /app/.venvs
COPY Pipfile Pipfile.lock ./
RUN pipenv install --deploy --site-packages
The important parts are installing poetry with the system pip, and then adding the --site-packages
flag when invoking pipenv install
.
There are multiple reasons behind this:
setuptools
, but it is not specified in pyproject.toml
's [build-systems] requires
So the corresponding resolution will be:
slim
images instead of alpine
18.1
$ pip install poetry && pip install --no-build-isolation pendulum
pyproject.toml
I got tired of this so I built my own Python package index with wheels for Alpine Linux.
I really like pendulum, it's baffling that this hasn't been resolved for so long. I understand that the author wrote poetry but it's not a glowing endorsement that people haven't been able to install pendulum for three months because of it.
I really like pendulum, it's baffling that this hasn't been resolved for so long.
I was able to solve it in Windows 7, Python 3.8 32 bits following @frostming advice, above.
This should be fixed in the latest 2.1.2
release.
It work like normal. Just tested .Thanks
i am getting the same error while installing mysqlclient
DEPRECATION: Could not build wheels for mysqlclient which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above.
wheel issue is- Building wheel for mysql (setup.py) ... done Created wheel for mysql: filename=mysql-0.0.2-py3-none-any.whl size=1252 sha256=ca801d4e9888754369abcdfb5791654e3a43361475a58726257b7954c7c4d735 Stored in directory: c:\users\admin\appdata\local\pip\cache\wheels\3e\4a\d0\506edab38d1bdf574b02c24805fcf7348a327297fcc285431d Building wheel for client (setup.py) ... done Created wheel for client: filename=client-0.0.1-py3-none-any.whl size=1441 sha256=cf97824f8b63db528014243e69082705c78c4397ca5891bfb2b7217a107e943c Stored in directory: c:\users\admin\appdata\local\pip\cache\wheels\1e\d6\d3\2084ee3b4ac9adaab2bf853307b140575c5fe9160821ab8e07 Building wheel for mysqlclient (setup.py) ... error ERROR: Command errored out with exit status 1:
@ritumishra9, I would suggest reporting this to mysqlclient. Though the references to mysql 0.0.1 and client 0.0.2 seem odd.
I really like pendulum, it's baffling that this hasn't been resolved for so long. I understand that the author wrote poetry but it's not a glowing endorsement that people haven't been able to install pendulum for three months because of it.
I'm still supporting people (with more or less success) that are getting this exact same issue at the end of 2021. 👎
It usually works best to create a new ticket with complete details of your case and a link to the existing ticket that you think is related. It's hard to help when the issue appears to be solved and no new information is provided.
To be clear, I'm not particularly involved with this project. Just offering some guidance on a path forward that's more likely to result in fixing your issues.
It usually works best to create a new ticket with complete details of your case
It's difficult because I use pendulum as a dependency for an application and the users try to get support from me and often don't provide all the required information. That would be much appreciated since I am far from an expert! I just try to get them to do things that I found in the issues here. So far it seems that pendulum 2.1.0 will install on most the machines without issues.
Ideally we would consolidate these infos e.g. pendulum requires poetry or otherwise it won't install properly with pip.
The new issue bug report template provides a starting point. Generally speaking you want the OS including version and architecture, Python version, Pendulum version, full terminal session (prompt, command, and output), and maybe also other cases where the same thing does work to help isolate what differences might show the issue. If the command you are running has a verbose option the full output as above could also be provided with the extra verbosity.
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)"'.
I'm also getting errors on attempting to install Pendulum, with nominal "pendulum (2.1.2) not supporting PEP 517 builds".
macOS 13.6.2, M1_chip
@ethanmsl Pendulum 3.0.0b1 has wheels for M1 macs and Python 3.12, but builds of Pendulum 2.* on Python 3.12+ seem like they'll be forever broken.
[x] I am on the latest Pendulum version.
[x] I have searched the issues of this repo and believe that this is not a duplicate.
Alpine 3.11 in Docker
Pendulum 2.1.0
Issue
I get an error about PEP 517 when trying to install Pendulum. The following Dockerfile (run with
docker build .
) reproduces the issue.The error is
ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly