Set python version that supports all packages and dependencies
The vre-language project cannot be properly installed using python3.6
.
Creating a virtual environment with python3.6 -m venv "vre-language"
enforces such version of the python interpreter onto the environment.
This inevitably affects the available versions of necessary packages and dependencies.
For example python3.6
has no official support for the pip
package beyond version 21.3.1.
However pip 21.3.1
can only install pint
up to version 0.17
(which is the last pint with python3.6 support).
On the other hand, python3.9
uses pip 23.1.2
, which allows installation up to the latest pint 0.22.
Thus, pip
has to be newer than 21.3.2
to satisfy the `pint 0.19.2' requirement.
Another problem from this "python version enforcing" is that, even if there are newer python versions available in the system, pip install
will ignore the
[...]
python_requires = >=3.7
[...]
specification in the setup.cfg
file.
So it is not possible to upgrade the python (and pip) versions for the project with the python_requires
method.
The outdated pip
problem leads to several package version incompatibility errors through the installation, which eventually fails.
I tried to work around keeping Python 3.6 with extensive version pinning, but I was not able to fix the issue.
Approach
The minimum python version, capable of supporting all required packages, should be updated in all setup files. The question here is which version? I am currently using Python 3.9.16 for the tests.
It is advisable to include a note in the installation section of README.md so users know about the pre-requisite of the Python version.
IK: Another thing that should be eventually considered is the dynamic change over versions and dependencies, which should be somehow captured in the CI pipeline
Note
One advantage of using the conda
installation is that it supports python 3.8, 3.9, 3.10, and 3.11.
So it is relatively straightforward to create an environment which intrinsically satisfies the python version requirement.
As a result, a recent-enough pip
version can be ensured for all packages and dependencies.