You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
People are running into situations where they try to start OneTrainer on Windows with the wrong Python version, and are getting errors about missing dependencies (because the requested package versions only exist for Python 3.10-3.12). Seen many such reports on Discord. It would be better if they were alerted about the problem, to reduce the amount of user error reports.
What would you like to see as a solution?
The same situation was solved on Linux by running a Python version check immediately after activating the venv/conda environment. The version check must run inside the environment. If the environment version is wrong, the startup script is aborted and the user is told about the problem.
On Linux, the version check runs as a core part of the environment activation: Activate (or create new environment), check version, then do the desired actions. So that we always know that the environment has the required Python version.
It's called like this for venv:
python scripts/util/version_check.py 3.10 3.13
Or like this for Conda:
conda run --prefix conda_env --no-capture-output python scripts/util/version_check.py 3.10 3.13
If the version is not >= 3.10 and < 3.13 then it will return an error code and output an error letting the user know their Python version is wrong.
So add that to the Windows .bat scripts, and exit if there's a non-zero exit code, and then it'll protect users there too.
Here's an example of an error:
$ python scripts/util/version_check.py 3.13 4
Error: Your Python version is too low: 3.10.15 (main, Sep 23 2024, 05:37:25) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)]. Must be >= 3.13 and < 4.
The text was updated successfully, but these errors were encountered:
Describe your use-case.
People are running into situations where they try to start OneTrainer on Windows with the wrong Python version, and are getting errors about missing dependencies (because the requested package versions only exist for Python 3.10-3.12). Seen many such reports on Discord. It would be better if they were alerted about the problem, to reduce the amount of user error reports.
What would you like to see as a solution?
The same situation was solved on Linux by running a Python version check immediately after activating the venv/conda environment. The version check must run inside the environment. If the environment version is wrong, the startup script is aborted and the user is told about the problem.
On Linux, the version check runs as a core part of the environment activation: Activate (or create new environment), check version, then do the desired actions. So that we always know that the environment has the required Python version.
It's called like this for venv:
Or like this for Conda:
If the version is not
>= 3.10 and < 3.13
then it will return an error code and output an error letting the user know their Python version is wrong.So add that to the Windows .bat scripts, and exit if there's a non-zero exit code, and then it'll protect users there too.
Here's an example of an error:
The text was updated successfully, but these errors were encountered: