GUI ISSUE

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
xsh
Posts: 13
Joined: Mon Mar 02, 2020 9:36 am

GUI ISSUE

Post by xsh »

Hello I'm trying to install version 6.0.2 on ubuntu18.04
During configuration I get the following error: "configure: error: cannot find PyQt5 support (>= 5.0) or PyQt4 support (>= 4.5), Graphical User Interface cannot be installed"

Please note that: I have installed python, qt5, pyqt5and sip
i try in a terminal:
import sys, string
try: import PyQt5
except ImportError: sys.exit(1)
from PyQt5.QtCore import *
if list(map(int, QT_VERSION_STR.split('.'))) < [5,0,0]: sys.exit(1)
if list(map(int, PYQT_VERSION_STR.split('.'))) < [5,0,0]: sys.exit(1)
sys.exit(0)]"
result is following:
2020-04-24 16-27-18屏幕截图.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: GUI ISSUE

Post by Yvan Fournier »

Hello,

Were you careful with the indentaton in the terminal ?

In any case, when testing from a terminal/Python console, the following should be enough:

Code: Select all

import PyQt5
If this fails, it means you need to install additional python3/Qt5 packages (Ubuntu tends to change the package names once in a while, so I do not remember the exact names, though it would be useful to keep track of them on the GitHub Wiki, since this is a recurring problem... I'll try to do this today.

Best regards,

Yvan
xsh
Posts: 13
Joined: Mon Mar 02, 2020 9:36 am

Re: GUI ISSUE

Post by xsh »

you see ,i have installed PyQt5 by"pip3 install PyQt5"
but during configuration I get the following error: "configure: error: cannot find PyQt5 support (>= 5.0) or PyQt4 support (>= 4.5), Graphical User Interface cannot be installed"
2020-04-24 21-59-51屏幕截图.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: GUI ISSUE

Post by Yvan Fournier »

Hello,

The installation might be using Python2 by default.

If using the autotools ("configure" , make, ...) level, add "PYTHON=python3" to the "configure" command.

If using the "install_saturne.py", set Python to /usr/bin/python3.

Best regards,

Yvan
xsh
Posts: 13
Joined: Mon Mar 02, 2020 9:36 am

Re: GUI ISSUE

Post by xsh »

yes,you are right.i set Python to /usr/bin/python3,and it works.
but i have another trouble now.it seems that there are some problems with pyrcc5
2020-04-24 22-50-38屏幕截图.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: GUI ISSUE

Post by Yvan Fournier »

Hello,

I'm not sure about this one, but is seems the pyrcc version installed with pip is not compatible with your system libraries.

Why can't you simply use the Ubuntu PyQt5 packages ? At least you would have consistent libraries and updates. Otherwise, you might have a mix of pip-installed and Ubuntu pyrcc5 (depending on the sourced environment variables).

Best regards,

Yvan
xsh
Posts: 13
Joined: Mon Mar 02, 2020 9:36 am

Re: GUI ISSUE

Post by xsh »

i install PyQt5 by"pip3 install PyQt5",install sip by"pip3 install sip" install qt5 by"sudo apt install qt5-default"
I am a novice,can you tell me where the ubuntu PyQt5 packages are,and how can i install them in my ubuntu
xsh
Posts: 13
Joined: Mon Mar 02, 2020 9:36 am

Re: GUI ISSUE

Post by xsh »

i got it!thank you very much,Yvan Fournier.
i install PyQt5 by"sudo apt-get install pyqt5-dev"and"sudo apt-get install pyqt5-dev-tools"
hope this can help more people!
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: GUI ISSUE

Post by Yvan Fournier »

Hello,

Yes, there are cases where the discribution packages may be too old, and where upgrading the distribution is not an option, but otherwise, when packages are available through a distribution, this is the first choice, as it usually leads to less consistency issues.

We have also had quite a few installation issues recently with users who installed packages using Anaconda, and did not master the subtleties well enough, for similar reasons.

I'll try to remember to add a Wiki section and mention pyqt5-dev and pyqt5-dev-tools,

Best regards,

Yvan
Post Reply