Gns3-gui: Fail update installation: No module named 'sip'

Created on 11 Mar 2019  路  6Comments  路  Source: GNS3/gns3-gui

I get this error when I launch gns3 from CLI or GUI:

Fail update installation: No module named 'sip'
Can't import Qt modules: Qt and/or PyQt is probably not installed correctly...

It's the version 2.1.14 I have on my debian PC

Bug Waiting for more information

Most helpful comment

It's what I did
virtualenv -p python3.7 /home/toor/GNS3
source /home/toor/GNS3/bin/activate
pip3 install -U gns3-gui gns3-server PyQt5-sip

And it fully worked!!!

But this is a temporary solution, I can't work definitely with my created virtualenv.
You need to fix GNS3 and use it with python3.7 in a future update.

All 6 comments

You must install PyQt.

I already have
apt install python3-pyqt5 python-pyqt5
python3-pyqt5 is already the newest version (5.11.3+dfsg-1+b3)
python-pyqt5 is already the newest version (5.11.3+dfsg-1+b3)

When I activate GNS3-GUI virtualenv and install pyqt5 from pip, I get this error
source /usr/share/gns3/gns3-gui/bin/activate
pip install -U PyQt5 PyQt5-sip
Traceback (most recent call last): File "/usr/share/gns3/gns3-gui/bin/pip", line 7, in <module> from pip import main File "/usr/share/gns3/gns3-gui/lib/python3.6/site-packages/pip/__init__.py", line 29, in <module> from pip.utils import get_installed_distributions, get_prog File "/usr/share/gns3/gns3-gui/lib/python3.6/site-packages/pip/utils/__init__.py", line 23, in <module> from pip.locations import ( File "/usr/share/gns3/gns3-gui/lib/python3.6/site-packages/pip/locations.py", line 9, in <module> from distutils import sysconfig File "/usr/share/gns3/gns3-gui/lib/python3.6/distutils/__init__.py", line 25, in <module> from distutils import dist, sysconfig ImportError: cannot import name 'dist'

By this error, I shall install python3-distutils, it's already installed, but with python3.7
apt install python3-distutils
python3-distutils is already the newest version (3.7.2-3)

I think it's due to python3 version mismatch between my global package and GNS3 virtualenv, but I can't really do anything since my I got python3 updates automatically.

Maybe create a virtual environment using something like this python3.7 -m venv <myenvname>

It's what I did
virtualenv -p python3.7 /home/toor/GNS3
source /home/toor/GNS3/bin/activate
pip3 install -U gns3-gui gns3-server PyQt5-sip

And it fully worked!!!

But this is a temporary solution, I can't work definitely with my created virtualenv.
You need to fix GNS3 and use it with python3.7 in a future update.

Thanks for the feedback. Version 2.2 will officially support Python 3.7

Version 2.2 and the same issue maintained on my case at least.

Was this page helpful?
0 / 5 - 0 ratings