-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Bug]: Could not find a version that matches protobuf #23982
Comments
This appears to be caused by other dependencies in your project, perhaps CC @tvalentyn |
@cypreess I don't reproduce the issue in a clean virutal environment. Please add relevant details if you have and reopen the issue if still present. |
I have a similar issue. Seems like python -m venv .venv
source .venv/bin/activate
pip install pip-tools
echo -e "apache-beam[gcp]\ngoogle-cloud-secret-manager" > requirements.in
pip-compile Out:
Can we reopen this? |
It seems like a bug in dependency resolution in piptools. But it may be also time to try to upgrade our protobuf depdendency. Opened #24569 |
@tvalentyn yes it is a problem with pip-tools. |
We prefer not to add indirect dependencies, let alone pin versions thereof. Can this be worked around by preinstalling protobuf v3, or explicitly adding it in the requirements.in ? |
Just pinning Just tried the same procedure with pip install poetry
mkdir foo && cd ./foo
poetry init
poetry add apache-beam[gcp] google-cloud-secret-manager
Adding |
@AnandInguva do we still need this mac-os only restriction? Line 189 in da100f9
IIRC we added b/c MacOS github action tests were failing. but if that not an issue anymore, it would be good to relax that. |
It is due to pip-compile resolver. You can try using
|
Output with |
Yes, I will take a look at this. |
@AnandInguva you are right
Concerning poetry I had the issue in both environments. |
Hi @AnandInguva we are blocked because of the above Protobuf restriction ('protobuf>3.12.2,<3.19.5') applies to all environments (also non-MacOS) when using Poetry. It'd be great if you could either remove the condition from |
Yes, protobuf is tightly bounded and as of now, there are efforts going on for upgrading protobuf to 4.x.x version in Apache Beam. We need to have a tight restriction in protobuf because protobuf is a build dependency of beam and minor changes on protobuf version needs to be validated so we couldn't have a loose bound. |
I understand that. However, the setup.py file seems to have the loose bound (protobuf>3.12.2,<4), while the PyPI bound is tighter, like the macOS build one. |
intresting. is poetry using : the metadata from https://packaging.python.org/en/latest/specifications/core-metadata/#requires-dist-multiple-use / https://pypi.org/pypi/apache-beam/2.43.0/json as SOT? it appears to be generated incorrectly. @AnandInguva I think we could fix it by adding a platform constraint (see https://peps.python.org/pep-0508/) instead of evaluating the platform dynamically in Line 183 in f40057b
|
Indeed @tvalentyn @AnandInguva https://pypi.org/pypi/apache-beam/2.43.0/json is the source of truth for Poetry, and this source of truth seems to be overly restrictive. Platform constraints sound like a reasonable approach. |
What happened?
Cannot install latest apache-beam[gcp]==2.42.0 because there is a conflict of protobuf version dependencies.
Issue Priority
Priority: 1
Issue Component
Component: io-py-gcp
The text was updated successfully, but these errors were encountered: