Open duncanmmacleod opened 10 months ago
Pandas requires version '2.8.0' or newer of 'numexpr' (version '2.7.3' currently installed).
This UserWarning is correct, because you specified numexpr=2.7. Version constraints doesn't apply when installing optional dependencies individually. For example, pip install "pandas[performance]"
would constrain numexpr>=2.8.4 (as specified starting on line 65 in pyproject.toml).
@rootsmusic, I (think I) understand the reason for the warning, what I'm asking here is if it's reasonable to modify the conda package to avoid the warning (basically to prevent the user from being able to build an environment that would emit a warning).
@rootsmusic It looks like conda-main added the constraints. It would be helpful if conda-forge did as well. My particular use case is sqlalchemy=1.4 and pandas. Using conda-forge:
mamba create -n test-pandas python=3.10 sqlalchemy=1.4 pandas -c conda-forge --override-channels
pandas 2.2.2
sqlalchemy 1.4.49
Using conda-main:
mamba create -n test-pandas python=3.10 sqlalchemy=1.4 pandas -c conda-main --override-channels
pandas 2.1.4
sqlalchemy 1.4.51
As pandas deprecated support for sqlalchemy 1.4 with pandas 2.2.0, only the conda-main solve results in a working environment. https://pandas.pydata.org/docs/dev/whatsnew/v2.2.0.html#increased-minimum-versions-for-dependencies
@jefsayshi Will #211 resolve this issue?
@rootsmusic It doesn't appear that any run_constrained
were added to meta.yml so it is unlikely to resolve the issue
Comment:
Currently, installing
pandas
doesn't constrain the versions of any of the 'optional-dependencies' specified in the project's metadata. This means its easy to find yourself in situations where importingpandas
results in warnings being emitted (slightly contrived example):Is it reasonable to add
requirements/run_constrained
to this recipe to map the version constraints for the optional dependencies?I worry about the scope of this, given that there are ~35 optional dependencies, all with version constraints, and I don't want to burden the maintainers of this feedstock with more grunt work.