Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modules

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
sciguy

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by sciguy »

Hello Yvan
I'm not sure I understood exactly what you suggested to do.
What I did was put both: "--with-libxml2-include=/usr/include/libxml2" and "--with-libxml2=/usr" into the config command. The command completed, and the make and make install commands also completed. However, again when I pressed: Check Mesh in Code Saturne, I got the same error message as in previous tries. Also, immediately after entering the command "code_saturne salome" in the terminal, I got some new warnings in the terminal window. I have attached this text in the file "StartUpWarnings.txt"

I've also attached the config.log file for this run.

The output of "find /usr/include -name parser.h" is: /usr/include/libxml2/libxml/parser.h

Please let me know if I did not do exactly what you suggested in your last email.
I hope you still have some ideas!
Thanks
Richard
Attachments
config.log
(284.02 KiB) Downloaded 266 times
StartUpWarnings.txt
(2.1 KiB) Downloaded 270 times
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by Yvan Fournier »

Hello,

It seems libxml2 is detected coorectly, so I do not understand why you have an error for "check mesh".

Could you post your cs_config.h file also (to make sure), and post the detailed error message for "check mesh" ?

Could you also post the output of:
ldd /home/richard/Code_Saturne/code_saturne-3.0.5/code_saturne-3.0.5/libexec/code_saturne/cs_solver ?

Regards,

Yvan
sciguy

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by sciguy »

Hello Yvan,
I have attached the following files:
cs_config.h from the last run;
lddOutput.txt which contains the output from your ldd command;
CSCheckMeshError.txt shows the error message that appears in the box that comes up when the Check Mesh button is pushed. The first two lines in this file appear in RED when they appear in CS.

Thank you for your help and patience.
Richard
Attachments
CSCheckMeshError.txt
(454 Bytes) Downloaded 252 times
lddOutput.txt
(1.72 KiB) Downloaded 266 times
cs_config.h
(10.04 KiB) Downloaded 279 times
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by Yvan Fournier »

Hello,

In your previous typo, you seem to be using "/home/richard/Code_Saturne/code_saturne-3.0.5/code_saturne-3.0.5" as a prefix. But the error message you have is based on the "/home/richard/Code_Saturne/code_saturne-3.0.5/" prefix (with one less code_saturne-3.0.5 subdirectory).

I suspect you may have spuriously added code_saturne-3.0.5 to your install prefix, and all your new installations are in a subdirectory of you previous install (meaning you may still be testing the old install).

Could you check this ?

Regards,

Yvan
sciguy

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by sciguy »

Hello Yvan
Yes, I noticed this second subdirectory in the prefix part of the config command some time ago. I never wanted that directory structure. But it came about by using the Automatic Install procedure. The script, install_saturne.py relies on a setup file. In that file, for the prefix, I used "home/richard/Code_Saturne/code_saturne-3.0.5". This auto install generated the config.log file, and at the top of that was the config command used. I copied and used this command after you pointed it out to me. Well, this command always contained that second subdirectory -- it seems that the auto install writes to the config.log file and when it wrote the config command, it worte it with the prefix "home/richard/Code_Saturne/code_saturne-3.0.5/code_saturne-3.0.5". I know it's hard to believe, but that's what I saw, and I just kept it as being correct.

And yes, there was a subdirectory with another set of files in the directory structure.

So as another test, I eliminated that subdirectory, and I changed the prefix in the config command so that the second subdirectory was no longer there. I cleared the build directory again. And then I ran the config command, the make command and the make install command. I ran code_saturne salome, and this warning appears in the terminal:
*
* Environment variable VISU_ROOT_DIR must be set
* Module VISU will be not available
*
********************************************************
****************************************************************
* Warning: VISU GUI resources are not found.
* VISU GUI will not be available.
****************************************************************
Is this a critical problem?

Finally, I got to Check Mesh again, and that ran with NO errors this time!

But I have a couple of questions -- I continued to work with the CFDSTUDY tutorial, and after Check Mesh, there is reference to the QUALITY.case file. The tutorial says "To visualize these quality criteria, we have to open the Paravis module, and open the QUALITY.case file in the postprocessing directory" I did open the Paravis module. In the picture, the QUALITY.case file is visible in the "Pipeline Browser" (not the Object Browser). But I cannot find a way to bring up the "Pipeline Browser" and none of the files mentioned (QUALITY.case, BOUNDARY_GROUPS.case, MESH_GROUPS.case) are listed. Can you tell me how to bring up the Pipeline Browser -- or does this have any connection to the warning above?

Thanks very much for all your help and I hope this solves permanently the libxml2 problem.
Regards,
Richard
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by Yvan Fournier »

Hello,

It is possible that the automatic installer automatically adds the code version, in case the user omits it, explaining why you had it twice...

In any case, the Salome messages about the VISU module can be ignored: when Code_Saturne 3.0 was first released, the main postprocessing module of Salome (version 7.2 if I remember correctly) was a module named VISU. This module has since been replaced by PARAVIS, and after an "overlap" period where both were available, VISU has been removed. This explains the warnings (as a side note, Code_Saturne 4.0 beta has switched to PARAVIS).

To open a postprocessing output in PARAVIS, use the "open file" menu item (not the first "open" item, but a second one a bit below). Once the file is loaded, use the "extract block" filter to select submeshes.

Regards,

Yvan
sciguy

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by sciguy »

Hello Yvan
Thank you -- I found the three .case files in the postprocessing directory following your directions.
However, when I select one, and press OK, nothing changes in the ParaView scene:1, Layout #1 window. There is no picture of the pipe geometry or mesh. This is true no matter which .case file I choose.

Also, the "Filters" Menu at the top of the Salome interface is greyed out -- I cannot select anything from this menu. There is also a small pushbutton in the ParaView window that is labeled "Select Block" but pushing this has no effect since there is nothing visible in the ParaView window at all, except the reference axes. Zooming in does not reveal any object. The Pipe is visible in the VTK window of Salome.

Any idea why the files do not seem to actually load? I have looked at the files with File manager and the files do exist and seem to have content. There are 28 files in the postprocessing directory.

Regards,
Richard
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by Yvan Fournier »

Hello,

Just in case, could you try this with a basic version of ParaView (not the Salome PARAVIS extension) ?

Regards,

Yvan
sciguy

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by sciguy »

Hello Yvan
Yes, you are right. When I run ParaView itself, I can open any of the three files, and the Pipe is visible in the viewer. And the Pipeline browser is shown. I do not really know how to use the three files, but I can manipulate selections in the Pipeline browser, update the window, and I can use the pushbutton of Selecting Blocks.

So I guess there is a problem with the coupling between Salome and Paravis. I remember now that when I installed Salome, I ran the test file called "salome_test.py", and I recall some problems at the end of that script when it tests Paravis. I just repeated this with Salome alone, and when the script gets to part 8. "Test Paravis", the following is written in the python console:
***********************************************
**** Importing paravis... It can take some time.
paraview version 4.1.0
**** Stage1: Importing MED file
Import "ResOK_0000.med"............... OK
**** Stage3: Displaying vector field
Get view................... OK
Creating Scalar Map....... OK
Creating Vectors.......... OK
Creating Iso Surfaces..... OK
Creating Cut Planes....... OK
Creating Scalar Map On Deformed Shape....... OK
Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: No module named py
***********************************************************
and execution stops. There are a lot of repeated error messages in the Message Window, each a repeat of these lines;
ERROR: In /misc/dn47/SALOME/PRODUCTS/7x/opt/Ubuntu.13.10.64/7.4.0/tmp/ParaView-4.1.0_SRC/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkPVCompositeDataPipeline (0x3e1d4a0): Algorithm vtkMEDReader(0x3e1a6c0) returned failure for request: vtkInformation (0x3e9d920) Debug: Off Modified Time: 368037 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA ALGORITHM_AFTER_FORWARD: 1 FROM_OUTPUT_PORT: 0 FORWARD_DIRECTION: 0

I am wondering if this problem is a result of the fact that the Salome version I could download was for Ubuntu 13.10, and I am using Ubuntu 14.04? Or is this a more fundamental problem of linkage between Salome and Paravis?

Thank you again.
Richard
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error: Unable to import PyQt4.QtCore or PyQt4.QtGui modu

Post by Yvan Fournier »

Hello,

This could be related to the different Ubuntu version, though I am not sure. In this case, using a more "universal" version of Salome (often a slightly bigger download, as it includes more libraries) might be a solution.

Regards,

Yvan
Post Reply