Can't install numpy (or anything) because it depends on higher python versions
I created a new python project using armarx-package add python spatial_affordance_relations
as noted here.
Now, when I try to add, e.g., numpy to my dependencies (poetry add numpy
), I get the following error:
Creating virtualenv spatial-affordance-relations-fBo_ndj3-py3.6 in /home/rkartmann/.cache/pypoetry/virtualenvs
Using version ^1.21.1 for numpy
Updating dependencies
Resolving dependencies... (0.4s)
SolverProblemError
The current project's Python requirement (>=3.6.9,<4.0.0) is not compatible with some of the required packages Python requirement:
- numpy requires Python >=3.7, so it will not be satisfied for Python >=3.6.9,<3.7
Because no versions of numpy match >1.21.1,<2.0.0
and numpy (1.21.1) requires Python >=3.7, numpy is forbidden.
So, because spatial-affordance-relations depends on numpy (^1.21.1), version solving failed.
at ~/.poetry/lib/poetry/puzzle/solver.py:241 in _solve
237│ packages = result.packages
238│ except OverrideNeeded as e:
239│ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240│ except SolveFailure as e:
→ 241│ raise SolverProblemError(e)
242│
243│ results = dict(
244│ depth_first_search(
245│ PackageNode(self._package, packages), aggregate_package_nodes
• Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For numpy, a possible solution would be to set the `python` property to ">=3.7,<4.0.0"
https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers
For some reason, no numpy version < 1.21 is found automatically. Also, I could not find a way to manually specify or update the python version for this package. Does poetry allow this?