Mate Scharnitzky
05/15/2023, 12:03 PMkedro-datasets
package? We ran into some pip resolver issues and turned out that from kedro-datasets==1.0.0
and above would require kedro to be kedro~=0.18.4
. We can verify this by pip install kedro-datasets==0.0.7 --dry-run
but we don’t find where this dependency is actually defined. In setup.py
it’s actually not mentioned.
Thank you!
@Kasper JanehagNok Lam Chan
05/15/2023, 12:45 PMkedro-datasets
is introduced with kedro 0.18.4, it’s not strictly depends on kedro>=0.18.4. With kedro>=0.18.4 it will automatically look for kedro-datasets
. If you are using older Kedro version you can still upgrade with kedro-datasets but you need to define the full import path.
I believe we have removed this strict dependency already, it was a mistake, let me check and get back to you later.Mate Scharnitzky
05/15/2023, 12:48 PMNok Lam Chan
05/15/2023, 12:51 PMMate Scharnitzky
05/15/2023, 12:52 PMkedro~=0.18.4
?Nok Lam Chan
05/15/2023, 12:54 PMMate Scharnitzky
05/15/2023, 12:57 PMNok Lam Chan
05/15/2023, 12:57 PMMate Scharnitzky
05/15/2023, 1:00 PMJuan Luis
05/15/2023, 7:45 PMpyproject.toml
, the modern standard for Python project metadata https://github.com/kedro-org/kedro-plugins/blob/246e05f06063598279d03b86590258f9a2b343a0/kedro-datasets/pyproject.toml#L13-L15Mate Scharnitzky
05/16/2023, 10:54 AM.toml
file, but I don’t find it in 1.2.0
. Is this released?Juan Luis
05/16/2023, 11:57 AMMate Scharnitzky
06/02/2023, 8:53 AMkedro-datasets[<>]
instead of kedro[<>]
, but it never went completely away.
Eventually, we believe it traces back to this pip issue. Essentially, pip gets confused when multiple dependencies are defined with the ~=
.
Given that kedro-datasets
pins pandas~=1.3
along with other dependencies we have in our product for pandas, e.g., pandas~=1.3.0
it triggered this error for us.
Now, we have a PR that refactors kedro-datasets[pandas.<>]
to first order dependencies, and instead of using ~=
, we use lower and upper bounds, e.g., pandas>=1.3, <2.0
Finally the question:
• Have you or other users observed this or similar error?
• Do you have any other idea how this could be fixed?
Obviously, using kedro-datasets
would be a much more elegant way of dealing with these dependencies, but it seems until the pip issue is resolved, this would be a problem for us.
pip._vendor.resolvelib.resolvers.InconsistentCandidate: Provided candidate LinkCandidate(.../pandas-1.5.3... (from https://...) (requires-python:>=3.8)') does not satisfy SpecifierRequirement('pandas~=1.3'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas>=1.1.1'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas>=1.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas~=1.3.0'), SpecifierRequirement('pandas'), SpecifierRequirement('pandas>=0.21.1'), SpecifierRequirement('pandas>=1.0.0'), SpecifierRequirement('pandas')
Nok Lam Chan
06/02/2023, 9:05 AMMate Scharnitzky
06/02/2023, 9:08 AM~=1.3
hence we set it to >=1.3, <2.0
.Nok Lam Chan
06/02/2023, 9:09 AMMate Scharnitzky
06/02/2023, 9:10 AMNok Lam Chan
06/02/2023, 9:11 AMMate Scharnitzky
06/02/2023, 9:12 AMNok Lam Chan
06/02/2023, 9:17 AMMate Scharnitzky
06/02/2023, 9:20 AMNok Lam Chan
06/02/2023, 9:23 AMJuan Luis
06/02/2023, 9:44 AM~=1.3
is not the same as ~=1.3.0
>=1.3.0,<1.4
Mate Scharnitzky
06/02/2023, 9:44 AMJuan Luis
06/02/2023, 9:45 AMMate Scharnitzky
06/02/2023, 9:47 AMJuan Luis
06/02/2023, 9:56 AMrequirements.txt
with these contents and try pip install -r requirements.txt
with pip 22.0.4 on Python 3.8 (tested on macOS), it gives the error you showed @Mate Scharnitzky :
pandas~=1.3
pandas~=1.3.0
pandas
pandas>=1.1.1
pandas
pandas
pandas~=1.3.0
pandas~=1.3.0
pandas~=1.3.0
pandas>=1.0
pandas~=1.3.0
pandas
pandas~=1.3.0
pandas~=1.3.0
pandas
pandas
pandas
pandas~=1.3.0
pandas~=1.3.0
pandas~=1.3.0
pandas~=1.3.0
pandas~=1.3.0
pandas
pandas~=1.3.0
pandas~=1.3.0
pandas
pandas~=1.3.0
pandas
pandas>=0.21.1
pandas>=1.0.0
pandas
packaging
version fixes the issue but pip is incompatible with it. </rabbit_hole>
Mate Scharnitzky
06/02/2023, 11:00 AM