It is currently Thu Oct 17, 2019 11:12 pm


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.04)
PostPosted: Wed Apr 02, 2014 4:00 am 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
Got Python 3.3 installed on Ubuntu 12.04 ( thanks to https://launchpad.net/~fkrull/+archive/deadsnakes ):

Code:
$ python3
Python 3.3.5 (default, Mar 12 2014, 02:09:17)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


Then got pip installed via "get-pip.py" and pulled in the pre-reqs for the GNS3 v1.0alpha1.
The server side starts:

Code:
$ gns3server
GNS3 server version 1.0-alpha1
Copyright (c) 2007-2014 GNS3 Technologies Inc.
[W 140401 23:54:17 config:82] no configuration file could be found or read
[I 140401 23:54:17 base:121] dynamips module running with PID 3334
[I 140401 23:54:17 base:74] ZeroMQ client (dynamips) connecting to 127.0.0.1:38722
[W 140401 23:54:17 __init__:69] iouyap binary couldn't be found!
[I 140401 23:54:17 server:194] ZeroMQ server listening to 127.0.0.1:38722
[I 140401 23:54:17 base:121] iou module running with PID 3337
[I 140401 23:54:17 base:74] ZeroMQ client (iou) connecting to 127.0.0.1:38722
Starting server on 0.0.0.0:8000


But the GUI side crashes with the following traceback:

Code:
$ gns3
Traceback (most recent call last):
  File "/usr/local/bin/gns3", line 9, in <module>
    load_entry_point('gns3-gui==1.0-alpha1', 'console_scripts', 'gns3')()
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 351, in load_entry_point
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 2363, in load_entry_point
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 2088, in load
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/main.py", line 25, in <module>
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/main_window.py", line 28, in <module>
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/qt.py", line 26, in <module>
ImportError: No module named 'sip'


I do have the "python3-sip" package installed -- I thought this provided the relevant module? If not, how can I get it?

Sooooo close to testing GNS3 v1.0, I can taste it...

Thanks,
Will




Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 4:16 am 
Offline

Joined: Wed Aug 14, 2013 4:22 pm
Posts: 30
CiscoStud here claims he was able to solve this problem by installing python3-setuptools http://forum.gns3.net/topic8960.html


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 4:38 am 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
@revs, don't think that's my problem, get-pip.py takes care of that for you.

I did try a few tests, however, as I had GNS 0.8.6 successfully running on this box, and knew I also have the sip module for python3 (dpkg -l lists it along with

Code:
$ dpkg -l | grep sip
ii  python-sip                             4.13.2-1                                 Python/C++ bindings generator runtime library
ii  python3-sip                            4.13.2-1                                 Python 3/C++ bindings generator runtime library


Since I just tried to install Python3 at first thru the normal Ubuntu 12.04 repos (which only gave me Python3.2, not 3.3), I knew I had that to test with as well as the standard Python2, and the Python3.3 I installed thru the PPA listed above. So I tried some import tests, and then listed the Python3.x import paths:

Code:
$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sip
>>> exit()
$
$ python3.2
Python 3.2.3 (default, Feb 27 2014, 21:31:18)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sip
>>> exit()
$
$ python3
Python 3.3.5 (default, Mar 12 2014, 02:09:17)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'sip'
>>> exit()
$
$
$
$ python3.2
Python 3.2.3 (default, Feb 27 2014, 21:31:18)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from pprint import pprint as pp
>>> pp(sys.path)
['',
'/usr/local/lib/python3.2/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.2',
'/usr/lib/python3.2/plat-linux2',
'/usr/lib/python3.2/lib-dynload',
'/usr/local/lib/python3.2/dist-packages']
>>> exit()
$
$ python3
Python 3.3.5 (default, Mar 12 2014, 02:09:17)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from pprint import pprint as pp
>>> pp(sys.path)
['',
'/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg',
'/usr/local/lib/python3.3/dist-packages/gns3_server-1.0_alpha1-py3.3.egg',
'/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg',
'/usr/local/lib/python3.3/dist-packages/ws4py-0.3.4-py3.3.egg',
'/usr/lib/python3.3',
'/usr/lib/python3.3/plat-linux',
'/usr/lib/python3.3/lib-dynload',
'/usr/local/lib/python3.3/dist-packages',
'/usr/lib/python3/dist-packages']
>>> exit()
$


So I still don't see where the problem is yet, but at least I have more info. Gotta quit for tonight, it's well past midnight here and I gotta work tomorrow... Back at it after work I guess. If anyone has a clue as to how I can get Python3.3 to find the sip module file so it can import it, let me know in the meantime...

Thanks,
Will


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 12:22 pm 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
OK, back at it... Found that 'python -v scriptname' can give you lots of details on what Python is doing, so I wrote a simple .py script that does a 'import sip' and then prints a line.

Turns out it wasn't the module path, but the module... I blithely copied over the sip.cpython-32mu.so module that was installed from the Ubuntu package 'python3-sip' to /usr/local/lib/python3.3/dist-packages/ and I found out that the name of such .so files matters ;-P

So I renamed it to 'sip.cpython-33m.so' - now it finds it, but blows up with the following traceback:

Code:
Traceback (most recent call last):
  File "sip-import-test.py", line 1, in <module>
    import sip
ImportError: /usr/local/lib/python3.3/dist-packages/sip.cpython-33m.so: undefined symbol: PyUnicodeUCS4_AsLatin1String


So I guess it's time to go compile a sip module for Python3.3 now ;-/


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 1:02 pm 
Offline

Joined: Tue Apr 01, 2014 2:11 pm
Posts: 43
Location: Ohio, US
I got the same output as in the OP when I installed on Ubuntu 13.10. I think I did "sudo pip3 install -U setuptools" or something similar and even though the output said it was already up-to-date, I was able to run gns3 afterwards.

_________________
Joe Amen - Enterprise IT Consultant
CompTIA A+, Net+
CCNA in progress


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 2:26 pm 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
Well, game over for Ubuntu 12.04... The sip issue is fixed by compiling/installing the latest sip code, but of course now it complains about loading PyQt modules...

Code:
$ gns3
Traceback (most recent call last):
  File "/usr/local/bin/gns3", line 9, in <module>
    load_entry_point('gns3-gui==1.0-alpha1', 'console_scripts', 'gns3')()
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 351, in load_entry_point
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 2363, in load_entry_point
  File "/usr/local/lib/python3.3/dist-packages/setuptools-3.4.1-py3.3.egg/pkg_resources.py", line 2088, in load
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/main.py", line 25, in <module>
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/main_window.py", line 28, in <module>
  File "/usr/local/lib/python3.3/dist-packages/gns3_gui-1.0_alpha1-py3.3.egg/gns3/qt.py", line 39, in <module>
ImportError: cannot import name QtCore


So I downloaded and have been trying to compile (worked) and install (doesn't work) the latest PyQt4 code for Py3.x... Keeps throwing various errors during the 'make install' process. I guess the dependant bits in Ubuntu 12.04 are just too old now... Thankfully the latest Ubuntu LTS (14.04) is right around the corner at this point. Will d/l and install the 14.04 RC and see how we fare on that... (Or I see I can use latest Debian unstable otherwise...)

Thanks,
Will


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 02, 2014 2:29 pm 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
josephraa wrote:
I got the same output as in the OP when I installed on Ubuntu 13.10. I think I did "sudo pip3 install -U setuptools" or something similar and even though the output said it was already up-to-date, I was able to run gns3 afterwards.


If you notice on my latest traceback, I do have (& GNS3 is using) the latest setuptools, so it's not that :)


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 09, 2014 6:43 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Sip and PyQt must be installed specifically for python3.

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: gns3server runs, gns3 (GUI) gives traceback (Ubuntu 12.0
PostPosted: Wed Apr 09, 2014 9:52 pm 
Offline

Joined: Fri Dec 23, 2011 8:29 pm
Posts: 32
Yup - sip wasn't too hard, but PyQt is a whole 'nuther story... Gave up due to lack of time.




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO