Flair is not running after upgrading on Ubuntu (wsl)

Versions

Please provide the used software versions.

FLUKA: 4-4.1
Flair: 3.4-5.2
Operating system: ubuntu 20.04.6

Description

Dear All,

After upgrading to 3.4-5.2 I get the error:

“File “/usr/local/flair/flair.py”, line 88, in
import inputs
File “/usr/local/flair/inputs.py”, line 18, in
import fluka
File “/usr/local/flair/fluka/init.py”, line 31, in
from .input import Fluka, LowNeutMaterial
File “/usr/local/flair/fluka/input.py”, line 245, in
class Fluka(Input):
File “/usr/local/flair/fluka/input.py”, line 260, in Fluka
abundances : dict[int,list[tuple[int,float]]] = {}
TypeError: ‘type’ object is not subscriptable”.

I tried the trick with flair.ini but it is not working reading Vassilis past solutions. (Do I have to upgrade FLuka?)

Thank you in advance,

Best wishes,

Nikos

Input files

Please upload all relevant files. (FLUKA input file, Flair project file, user routines, and data files)

Dear Nikolaos,

it seems the recently added code requires python 3.9 to work correctly.

I see two solutions:

  1. You may want to change the WSL distribution for a more recent version of Ubuntu.

  2. You can install the python3.9 package on Ubuntu 20.04 and add the following line to your .bashrc file:

    export PYTHON=python3.9
    

Cheers,
David

Dear David,

Thank you for your prompt reply yesterday morning,

Best,

Nikos