PyQt4 problem

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

PyQt4 problem

Post by Christine Leroy »

Hi !!!

I've been trying to install Saturne in many different ways, but at the end, when compiling ncs, I always have the same message:

configure: error: in `/home/leroy/SATURNE/ncs-2.0.3.build':
configure: error: cannot find PyQt4 support (>= 4.3), Graphical User Interface cannot be installed See `config.log' for more details


 but if I check for PyQt4, I have the following message :
 
[root@mediceo6NB ncs-2.0.3.build]# yum install PyQt4
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package PyQt4-4.7.3-1.fc12.x86_64 already installed and latest version Nothing to do


PS: I've attached to this message the config.log
 
I am working with Fedora 12
 
Any help would be nice !!!

Thank you

Christine  
Attachments
config.log
(106.86 KiB) Downloaded 359 times
Yvan Fournier

Re: PyQt4 problem

Post by Yvan Fournier »

Hello,

You need PyQt4-dev also (it might be named slightly differently, such as -devel instead of -dev, depending on your distribution).

Regards,

  Yvan
Christine Leroy

Re: PyQt4 problem

Post by Christine Leroy »

Hi Yvan,

Thanks a lot for your reply.
(I stay with english as it can be of help for other people).

I've tried to install the dev package....but still have the same answer :
[root@mediceo6NB leroy]# yum install PyQt4-devel
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package PyQt4-devel-4.7.3-1.fc12.x86_64 already installed and latest version
Nothing to do
I also tried again the installation of ncs, and I still have the same error message concerning PyQt4.

I really don't know how to proceed.

What is PyQt4 used for?

As it seems to be in my computer, maybe there could be a problem, such as Saturne is not able to find it and I should change something in the  "PATH" or other things like this, but I'm not a Linux specialist and I have no idea...
 
Christine
 
Previously Yvan Fournier wrote:
Hello,

You need PyQt4-dev also (it might be named slightly differently, such as -devel instead of -dev, depending on your distribution).

Regards,

  Yvan
 
 

 
Yvan Fournier

Re: PyQt4 problem

Post by Yvan Fournier »

Hello,

Looking at your config.log, it seems that you have a second installation of Python in /usr/local, so it is probable that the PyQt4 and PyQt4 packages only work with the python version from /usr (Note that /usr/local takes priority over /usr, but you should only have locally installed packages under /usr/local).

You should try to add

--with-python_exec=/usr/bin

to the configure command for Code_Saturne, to try to use the reference Python version (assuming /usr/bin/python exists, but the contrary would be surprising).

Best regards,

  Yvan
Christine Leroy

Re: PyQt4 problem

Post by Christine Leroy »

Hi Yvan,

I've done what you wrote and it worked, thank you so much !!!

I've been trying for 2 weeks to install the code....I had many errors I could deal with, but with this one, I really couldn't do anything !!!!

Now I have to add something to the PATH I think.

I just have to write in a shell

export PATH=/root/opt/ncs-2.0.3/bin:$PATH
   ?
then to run the program : code_saturne
 
again, thank you so much
 
Christine
 
Previously Yvan Fournier wrote:
Hello,

Looking at your config.log, it seems that you have a second installation of Python in /usr/local, so it is probable that the PyQt4 and PyQt4 packages only work with the python version from /usr (Note that /usr/local takes priority over /usr, but you should only have locally installed packages under /usr/local).

You should try to add

--with-python_exec=/usr/bin

to the configure command for Code_Saturne, to try to use the reference Python version (assuming /usr/bin/python exists, but the contrary would be surprising).

Best regards,

  Yvan
Yvan Fournier

Re: PyQt4 problem

Post by Yvan Fournier »

Hello again,

Yes, you can either add the Code_Saturne bin directory in your path, or simply define an alias:

alias code_saturne=/root/opt/ncs-2.0.3/bin/code_saturne

(or even simply use the full path to code_saturne).

For additional comfort (if you are using a bash shell), you may also add:

source /root/opt/ncs-2.0.3/etc/bash_completion.d/code_saturne

to obtain a semi-automatic bash completion for Code_Saturne commands and their options.

Best regards,

  Yvan
Christine Leroy

Re: PyQt4 problem

Post by Christine Leroy »

Oups,

sorry, but I'm lost....

the "code_saturne" is in :  /root/opt/cs-203/bin

so I did :

alias code_saturne=/root/opt/cs-203/bin/code_saturne

but when I call the program, I have :

[leroy@mediceo6NB bin]$ code_saturne
bash: /root/opt/cs-203/bin/code_saturne: Permission denied
 

probably because I can't go into root if I'm not root....so I logged as root,and had the following answer :
 
[root@mediceo6NB bin]# code_saturne
Command not found.
 
 
in the directory:
/home/leroy/SATURNE/ncs-2.0.3.build/bin, I also have a file code_saturne, but it's not green as any program.....

PS: for installing the program, I followed the instruction of the README.txt of the installer, so I create for every module an other module.build ( for example : ncs-2.0.3.build) from which I launched the command fo compiling, and I did everything logged as root.

I also tried with export PATH etc....but, no more results.

With Regards

Christine
Yvan Fournier

Re: PyQt4 problem

Post by Yvan Fournier »

Hello,

I confirm that /root is accessible only to the root account, so if you install the code under /root, it will not be usable (not accessible, so not found) from other accounts. If you defined the alias before logging as root, it will not work either (you need to define it when logged as the user who will run the code, unless you define it in /etc/bash.bashrc or some equivalent path under /etc).

You should either (depending on whether the install is for multiple users or not):
  • install as root under another prefix (/opt/saturne/2.0 or /usr/local for example)
    install as a regular user, for example /home/leroy/Code_Saturne/2.0.
The code_saturne script you have under /home/leroy/SATURNE/ncs-2.0.3.build is not executable, as it has only been built (result of configure and make), not installed (the following stage, "make install"). When installing, some path variables are replaced by the destination paths, and the script is made executable).

Best regards,

  Yvan
Christine Leroy

Re: PyQt4 problem

Post by Christine Leroy »

ciao Yvan,

thanks a lot for your reply.

In the meantime, I've reinstalled the code but not in the /root/opt directory...in another prefix (I hope I use the right term) : /home/leroy/software/saturne/cs-203

but i'm still not able to run it with the alias even if i did it as root. I works the first time then it writes :

bash: /home/leroy/SATURNE/ncs-2.0.3.build/bin/code_saturne: Permission denied

this corresponds to the previous installation. I cancelled in the bash file but the problem stills remains.

So I did :
 
[root@mediceo6NB leroy]# echo 'export PATH=$PATH:/home/leroy/software/saturne/cs-203/bin/code_saturne' >> /home/leroy/.bashrc
[root@mediceo6NB leroy]# code_saturne
Usage: /home/leroy/software/saturne/cs-203/bin/code_saturne <topic>
Topics:
help
check_consistency
check_mesh
compile
config
create
gui
info
plot_probes

Options:
  -h, --help  show this help message and exit
[root@mediceo6NB leroy]# exit
exit
[leroy@mediceo6NB ~]$
[leroy@mediceo6NB ~]$ code_saturne
bash: /home/leroy/SATURNE/ncs-2.0.3.build/bin/code_saturne: Permission denied [leroy@mediceo6NB ~]$ vi /home/leroy/.bashrc
  !  I've checked here and the path is ok
[leroy@mediceo6NB ~]$ vi /home/leroy/.bash_profile
! also here
[leroy@mediceo6NB ~]$ code_saturne
bash: /home/leroy/SATURNE/ncs-2.0.3.build/bin/code_saturne: Permission denied

even if I log as root...

[root@mediceo6NB leroy]# code_saturne bash: /home/leroy/SATURNE/ncs-2.0.3.build
/bin/code_saturne: Permission denied


it remains on the old installation...maybe because I also tried with "source" before and I don't know how to cancel what i did then. But I tried to do it again with the good prefix and I obtained:

[root@mediceo6NB leroy]# source /home/leroy/software/saturne/cs-203/etc/bash_completion.d/code_saturne
bash: /home/leroy/software/saturne/cs-203/etc/bash_completion.d/code_saturne: line 58: syntax error in conditional expression:
unexpected token `('
bash: /home/leroy/software/saturne/cs-203/etc/bash_completion.d/code_saturne: line 58: syntax error near `@(-'
bash: /home/leroy/software/saturne/cs-203/etc/bash_completion.d/code_saturne: line 58: `    if [[ ${prev} == @(-h|--help|-v|--version) ]]; then'


The good point is that I can launch the program if I write the entire path !!! I can't tell at this point if it works ok, I've never used it before. By the way, I was looking for Tutorial. I just found a tutorial.pdf but no files with the mesh etc... have you any idea where I cold find this?

Best Regards

Christine
Christine Leroy

Re: PyQt4 problem

Post by Christine Leroy »

Yvan,

PS : ok for the Tutorial, I think I found something in the cs-203/..../ncs directory, even if not able to launch anything at the moment....maybe because I can't open Saturne normally but still with all the all address (/home/leroy/.../code_saturne) so I can't launch commands maybe...

Christine
Post Reply