Skip to content

Upgrade to pandas 2 #22

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

Closed
stefanbischof opened this issue Jul 12, 2024 · 2 comments
Closed

Upgrade to pandas 2 #22

stefanbischof opened this issue Jul 12, 2024 · 2 comments

Comments

@stefanbischof
Copy link

Hi,

could you upgrade the dependency to pandas to version >= 2.0.0?

The issue is that rdfpandas currently doesn't work with pandas >= 2.0.0. Since I have to use pandas < 2.0.0, I also have to use an older version of numpy < 1.26. Now, it is not possible to install numpy on python 3.12 because it doesn't PEP513 builds (see https://stackoverflow.com/questions/77582651/why-doesnt-numpy-support-pep517-builds). So I have to resort to python 3.11.

Long story short: please upgrade to pandas >= 2.0.0 so we can use rdfpandas with python 3.12 :)

@cadmiumkitty
Copy link
Owner

Hi Stefan, I'm just looking at the requirements.txt and setup.py, and they both list pandas>=2.0.0 (the change was made in version 1.1.6 here on GitHub https://github.com/cadmiumkitty/rdfpandas/releases/tag/1.1.6 and here https://pypi.org/project/rdfpandas/). I am a little unsure what went on with the readthedocs in the meantime, as it seems to list 1.1.5 as the latest version available; I will need to look into it. What version of rdfpandas are you using?

@stefanbischof
Copy link
Author

Hi, I am/was using version 1.1.5.

Thanks for the hint with version 1.1.6. That lead me to the solution, to adapt the version specifier for python to >=3.11,<4. I had to explicitly exclude python 4 and upgrad the python minimum version. Some details below for others in the future.


Now, I fixed the version of rdfpandas to be >= 1.1.6 then this happened:

> poetry update
Updating dependencies
Resolving dependencies... (21.2s)

The current project's supported Python range (>=3.8) is not compatible with some of the required packages Python requirement:
  - rdflib requires Python >=3.8.1,<4.0.0, so it will not be satisfied for Python >=3.8,<3.8.1 || >=4.0.0
  - rdflib requires Python >=3.7,<4.0, so it will not be satisfied for Python >=4.0

Because no versions of rdflib match >6.3.2,<7.0.0 || >7.0.0
 and rdflib (6.3.2) requires Python >=3.7,<4.0, rdflib is forbidden.
And because rdflib (7.0.0) requires Python >=3.8.1,<4.0.0, rdflib is forbidden.
Because no versions of rdfpandas match >1.1.6
 and rdfpandas (1.1.6) depends on rdflib (>=6.3.2), rdfpandas (>=1.1.6) requires rdflib (>=6.3.2).
Thus, rdfpandas is forbidden.
[...]

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For rdflib, a possible solution would be to set the `python` property to ">=3.8.1,<4.0.0"
    For rdflib, a possible solution would be to set the `python` property to ">=3.8,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

So it seems rdfpandas (I now got 1.1.16) upgraded to a newer version of rdflib, which in turn needs me to exclude python version 4. Now I can also get pandas 2. Numpy (which I used in the same project) had a similar problem, I had to set the minimum python version to >= 3.9. Since I use nothing older than 3.11 I set it to >=3.11,<4. In the end I get rdflib 7 and pandas 2.2.2 and all the dependency problems are solved.

@cadmiumkitty cadmiumkitty pinned this issue Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants