Running viktor-cli with python 3.10.0

Hi Support,
I have a new laptop and I try to install the viktor-cli again. I’ve installed python 3.10.0, but when running the viktor-cli command, the following warning occurs:


However, I can’t find the viktor.config.toml file. Where is it normally situated?

Installing an app also fails, I think because I haven’t edited the settings in the specified file.

Hi Bart,

What version of the SDK do you use? The viktor.config.toml file was introduced in 13.2 with the removal of the manifest and is mandatory starting 13.3. It does not exist before that, so that might explain why you do not find it. There is an automated fix to change from a manifest to the config.toml, u77, you can find more here: SDK - Upgrades | VIKTOR Documentation

Thanks for letting us know, we might want to update the message to make this more clear.

For earlier versions of the SDK, you you can still develop in 3.10, but you run the risk that your app behaves differently in production, as you are not be able to set the python version used in production, so we do not recommend this.

regards,
Paulien

Hi Paulien,
The SDK version of the app is 12.10.0. The application doesn’t install properly, so I can’t run it. In the install progress the following message is shown:

I think this is because of the python version, do you think otherwise?

It is not clear in the WARNING message. But you should run viktor-cli configure and change the path to the python 3.7 version instead of the 3.10 as it is now. Than it will most likely work.

1 Like

Yes, exactly, if you want to stay on v12 and you use venv, you need to manually make sure that you use python 3.7. I agree the error is not clear, we’ll look into clearer error message internally!

thanks, this works fine

To elaborate a bit more on what is happening:

You are trying to install an older version of scipy (1.3.3) with a ‘new’ Python version, namely 3.10. That specific scipy version was released before Python 3.10 was released. Therefore, no wheel is available for this Python version. This means that the scipy needs to be built from source and this requires additional build dependencies. An error occurs when pip tries to install these build dependencies.

As @Johan_Tuls suggests changing the python version with viktor-cli configure is a solution to this problem. The reason for this is that you will use Python 3.7 to install the dependencies in your virtual environment. For that version a pre-compiled wheel is available for scipy==1.3.3.

If you would like to use a newer Python version you could also consider updating to a newer scipy version that has wheels available for Python 3.10.

2 Likes