Problem with Python version for version >=3.10
Posted: Tue Apr 05, 2022 11:41 am
Hi all,
I wonder if someone has stumbled on this problem before. CS stopped to work after upgrade to Fedora 35. It compiles and installs OK, but when trying to run a case it results in an error
It seems that the problem is that in many Python scripts within CS the major.minor version of Python is obtained as sys.version[:3] which fails unless both numbers have one digit. I'm using CS 6.1 but I checked with the current version and it seems that the problem is still there.
I solved it replacing in the sources sys.version[:3] with the following string:
Find attached a patch in case it helps.
I wonder if someone has stumbled on this problem before. CS stopped to work after upgrade to Fedora 35. It compiles and installs OK, but when trying to run a case it results in an error
Code: Select all
Traceback (most recent call last):
File "/home/scratch/mstorti/TO-BACKUP/DATA-CD/saturne-vof/bin/code_saturne", line 67, in <module>
from cs_script import master_script
I solved it replacing in the sources sys.version[:3] with the following string:
Code: Select all
python_version = "%d.%d" % (sys.version_info.major,sys.version_info.minor)