Closed ShuN6211 closed 2 months ago
Hi @ShuN6211 , thanks for reporting this!
How about this instead:
pyvrp = { version = ">=0.8.2", optional = true, python = ">=3.9,<4.0" }
in the dependencies. This is because pyvrp
is optional, and we would like not to constrain rl4co
too much based on such dependencies. I tried poetry install
, and it works ~
Hi @fedebotu , thanks for commenting!!
It's a good idea to specify python version "<4.0" not in dependencies but in optional scope. 😃
However, only changing a line regarding "pyvrp" still causes another error in my environment.
It seems numba(optional) and lightning requires the numpy that requires python = ">=3.9"
I tried following chunk and it works.
⭕️ Works
[tool.poetry.dependencies]
# Required dependencies
python = ">=3.9"
# Routing
pyvrp = { version = ">=0.8.2", optional = true, python = "<4.0" }
❌ Doesn't work , still causes another error
[tool.poetry.dependencies]
# Required dependencies
python = ">=3.8"
# Routing
pyvrp = { version = ">=0.8.2", optional = true, python = ">=3.9,<4.0" }
Procedure
python -m pip install poetry
rm poetry.lock
if there ispoetry install
Side notes
I see! This is better, in my opinion, since we may want to restrict a lower version of Python rather than the upper one (Python 3.8 is pretty old anyway). To be honest, though, I'm not a fan of restricting the main Python version because of some optional dependency, so if there was another way, I'd rather go for that :)
Thoughts @cbhua @LTluttmann?
Update: the newest PyTorch Lightning version has been released, and dropped support for Python 3.8 too: https://github.com/Lightning-AI/pytorch-lightning/releases/tag/2.4.0
Given this seems to be standard practice by now, I'd say let's remove official support for 3.8 altogether and follow @ShuN6211 's suggestion
@fedebotu
Thanks for sharing the dropping support for python 3.8 in the newest PyTorch Lightning.
I added the revert commit and a new one that reflects conversation between us.
If you don't prefer revert, I would reopen new PR.
@ShuN6211 Thanks for reporting the bug about the Python version!
Considering the status of Python versions from the official release cycle that Python 3.8's end-of-life day is 2024-10
, I agree that let's stop the support for Python 3.8.
Enable to run "poetry install".
Description
Update pyproject.toml to be enable to run
poetry install
and install rl4co project by poetry tool. At current project, runningpoetry install
may causes following errors.Motivation and Context
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
x
in all the boxes that apply. If you are unsure about any of these, don't hesitate to ask. We are here to help!