Error with PyQt5

Hello,

I am currently trying to install code-saturne 6.0.4 with the automated install but I am facing to an issue.

  • code-saturne : 6.0.4
  • Kubuntu 20.04 LTS
  • Log file attached

When I start install_saturne.py, I get the message below :

configure: error: cannot find PyQt5 support (>= 5.0) or PyQt4 support (>= 4.5), Graphical User Interface cannot be installed

I tried to install PyQt5 and PyQt4 with apt-get but the issue still present.

Thank you in advance.

BR
install_saturne.log (9.07 KB)

Hello,

You might also need PyQt5 dev tools. We recently posted a list of packages which you may need for various distributions on the wiki, so you might want to check that: https://github.com/code-saturne/code_saturne/wiki/Pre-installation:-Linux-distribution-packages.

Best regards,

Yvan

Merci Yvan.

I already installed the required packages indicated in your link but no luck…
I installed too PyQt5 from source but that was not better.

Best regards,

Hello,

If you run Python in a terminal and type “import PyQt5” do you have an error ?

Do you have environment modules ore a secondary packaging system such as Conda which might interfere ? What does the config.log file contain ? Also, if using the automatic installer, be careful to set PYTHON=python3 (instead of python) if that is the version PyQt5 is installed with.

Best regards,

Yvan

Hi,

Thanks, PYTHON=python3 was the solution. The installation completed well.
I am facing to a new issue when I try to start code-saturne. Please see the message below :

bash: /home/jy/Code_Saturne/6.0.4/code_saturne-6.0.4/arch/Linux_x86_64/bin/code_saturne: python3: bad interpreter: No such file or directory

If you have any idea what could be the reason of this failure?

Thank you in advance.

Best regards,

Ok, I finally found the solution.
I modified the shebang from :

#!python3

to

#!/usr/bin/python3

Thanks again for your help !

Hii Marvin, I aam facing the same issues. Can you please let me know where do you set PYTHON=python3 ?, i did not get completely. Thanks for your help. Regards Bineet

in the bashrc you meant ?

Hello,

No, code_saturne stores the PYTHON value given at “configure” (before make && make install) time, so whatever is in .bashrc will not change anything.

If necessary, force “PYTHON=/usr/bin/python3” at the end of the “configure” options, or for an existing install, edit the /bin/code_saturne script (but if you reinstall, it will be overwritten, so doing this at “configure” time is slower but cleaner.

Best regards,

Yvan

Thank you Yvan

python3 folder and its packages are stored in /usr/lib/ in my case and not in /usr/bin/. I have provided the correct path in setup file, ran the install_saturne.py however got the error
configure: error: Python interpreter is too old even though the version is 3.8.2

Also i am doing all this using windows subsystem for linux in windows10


Thanks for you help

Regards

Bineet

Hello,

What type of system/distribution are you running under the WSL ? The Python libraries are in /usr/lib most of the time, but I have never seen a system with the Python executabl in /usr/lib.

What does the “type python3” command return ?

Regards,

Yvan

Thanks,

Its ubuntu 20.04 and “type python3” returns “python3 is hashed (/usr/bin/python3)”

Regards

Bineet

Hello,

so that is the value you need to define as python (in the automatic installer) or PYTHON= (in the lower-level “configure” options).

Things should then work. Do you have additional Python environments (such as CONDA) ? They can make a mess if you mix versions.

Best regards,

Yvan