LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-15-2014, 04:31 AM   #1
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Rep: Reputation: Disabled
GNS3 has a QtCore.QT_VERSION problem on archlinux up to date 2014-10-1


hi Guy
i notice that GNS3 0.8.7 official release can not work under arch linux with pyqt4 environment installed, error prompt as follow
Code:
Need Qt v4.6 or higher, but got v%s" % QtCore.QT_VERSION_STR
i read the gns3 initiation file of which filename is gns3.pyw , a python script
here is what i saw
Code:
 
 if QtCore.QT_VERSION < 0x040600:
    raise RuntimeError, "Need Qt v4.6 or higher, but got v%s" % QtCore.QT_VERSION_STR

 if QtCore.PYQT_VERSION < 0x040500:
    raise RuntimeError, "Need PyQt v4.5 or higher, but got v%s" % QtCore.PYQT_VERSION_STR
the QT and PyQt versions need to be checked before running the application

so i wrote another simple Python script to print which version did gns3 get
Code:
  1 #!/usr/bin/python
  2 import sys, os, time, traceback
  3 print "++++++++++++++"
  4 print sys.version_info
  5 from PyQt4 import QtCore, QtGui
  6 print "QtCore.QT_VERSION_STR=" + QtCore.QT_VERSION_STR
  7 print "QtCore.QT_VERSION="+QtCore.QT_VERSION
  8 print  "QtCore.PYQT_VERSION_STR="+QtCore.PYQT_VERSION_STR
as the outpunt is
Code:
QtCore.QT_VERSION_STR=4.8.6
QtCore.QT_VERSION=40806
QtCore.PYQT_VERSION_STR=4.11.2
looks like the pyqt version does not meet the qualification of gns3 required.

i start the next step to fix the problem
pacman -S pyqt

there is only python-pyqt4-4.11.2 can be installed

i try to import pyqt5 instead of pyqt4 in the script of gns3

but it print out the same error,
and i dont understand , my pyqt5 version is 5.3.2-1
it is still can meet the require of gns3, the QtCore.QT_VERSION_STR output 0x050302,is totally over 0x040600, why i got the same error.

does anyone run gns3 successfully with kernel 3.16 on archlinux up to date 2014-10-01, please tell me your solution.

Last edited by gbcbooks; 10-15-2014 at 04:39 AM.
 
Old 10-15-2014, 04:44 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
PyQt 4.11.2 is not Qt.

The required package name is "qt4"
. ftp://ftp.u-tx.net/archlinux/extra/os/i686/
. ftp://ftp.u-tx.net/archlinux/extra/os/x86_64/
 
Old 10-15-2014, 04:53 AM   #3
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
PyQt 4.11.2 is not Qt.

The required package name is "qt4"
. ftp://ftp.u-tx.net/archlinux/extra/os/i686/
. ftp://ftp.u-tx.net/archlinux/extra/os/x86_64/
thanks for you quick reply , i have qt4 and qt5 install on my arch linux

see the python script output

QtCore.QT_VERSION=4.8.6
 
Old 10-15-2014, 09:53 AM   #4
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Original Poster
Rep: Reputation: Disabled
i think i make a mistake of the error output
here is the original error output
Code:
  File "./gns3", line 43
    raise RuntimeError, "Need Qt v4.6 or higher, but got v%s" % QtCore.QT_VERSION_STR
                                        ^
SyntaxError: invalid syntax
it is a syntax error

i check my default python version by the following command
Code:
ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 Oct  8 21:58 /usr/bin/python -> python3
seem my default python version has been linked to python3

after i recreate the python link to python2.7 , gns3 works properly

Code:
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/bin/python2 /usr/bin/python
or Change the shell environment which define in the begining of file gns3.pyw from
Code:
#!/usr/bin/env python
to
Code:
#!/usr/bin/python2
the problem has been solved .
 
Old 10-15-2014, 12:56 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Please mark the thread as SOLVED :

"Thread Tools" → *SOLVED*
 
  


Reply

Tags
gns3



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot install FLUXBOX archlinux 2014 ZGNULINUX Arch 7 05-26-2014 04:49 PM
LXer: Android 4.4 KitKat Release Date: Easter or Halloween 2014 LXer Syndicated Linux News 0 09-04-2013 11:41 PM
LXer: Java 8 release date slips again, now planned for 2014 LXer Syndicated Linux News 0 04-20-2013 06:42 AM
[SOLVED] Having Problem in instaling GNS3 on Fedora 14 mnabeel Linux - Newbie 5 12-13-2010 12:40 AM
[SOLVED] archlinux.mirrors.uk2.net Arch mirror is not up to date. cantab Arch 2 01-18-2010 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration