GUFW not launching on Ubuntu 17.04












0















The authentication window pops-up but then I'm getting a bunch of errors (in the console) and nothing happens. Looked up similar issues on the Internet and tried the following:




  • updating the OS

  • installing: python-gobject, python-gi, dev-tools


Thanks in advance for any advice.




Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'









share|improve this question























  • ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

    – waltinator
    Sep 19 '17 at 22:11






  • 1





    @waltinator could you provide more details.

    – Panther
    Sep 20 '17 at 3:00
















0















The authentication window pops-up but then I'm getting a bunch of errors (in the console) and nothing happens. Looked up similar issues on the Internet and tried the following:




  • updating the OS

  • installing: python-gobject, python-gi, dev-tools


Thanks in advance for any advice.




Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'









share|improve this question























  • ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

    – waltinator
    Sep 19 '17 at 22:11






  • 1





    @waltinator could you provide more details.

    – Panther
    Sep 20 '17 at 3:00














0












0








0








The authentication window pops-up but then I'm getting a bunch of errors (in the console) and nothing happens. Looked up similar issues on the Internet and tried the following:




  • updating the OS

  • installing: python-gobject, python-gi, dev-tools


Thanks in advance for any advice.




Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'









share|improve this question














The authentication window pops-up but then I'm getting a bunch of errors (in the console) and nothing happens. Looked up similar issues on the Internet and tried the following:




  • updating the OS

  • installing: python-gobject, python-gi, dev-tools


Thanks in advance for any advice.




Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/share/gufw/gufw/gufw.py", line 21, in
from gufw.view.gufw import Gufw
File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in
import gi
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in
from . import _gi
ImportError: cannot import name '_gi'






gufw






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 19 '17 at 21:57









MaddakMaddak

1




1













  • ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

    – waltinator
    Sep 19 '17 at 22:11






  • 1





    @waltinator could you provide more details.

    – Panther
    Sep 20 '17 at 3:00



















  • ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

    – waltinator
    Sep 19 '17 at 22:11






  • 1





    @waltinator could you provide more details.

    – Panther
    Sep 20 '17 at 3:00

















ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

– waltinator
Sep 19 '17 at 22:11





ModuleNotFoundError: No module named 'apt_pkg' says install the apt_pkg module.

– waltinator
Sep 19 '17 at 22:11




1




1





@waltinator could you provide more details.

– Panther
Sep 20 '17 at 3:00





@waltinator could you provide more details.

– Panther
Sep 20 '17 at 3:00










2 Answers
2






active

oldest

votes


















0














Not sure what, if anything you might have done to cause this. Upgrade Ubuntu? How did you install UFW? From the repos?



At any rate , that is sort of a non-specific error and might occur with other packages as well.



As a first step try updating (“dist-upgrade”) to see if you have outdated or held packages.



sudo apt-get update
sudo apt-get dist-upgrade -f


If that fails as a second step try re-installing python-apt



See https://packages.ubuntu.com/zesty/python-apt



sudo apt-get install --reinstall python-apt


You could shorten those two commands, but I hope it is more clear to demonstrate the reinstallation of python-apt.






share|improve this answer


























  • I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

    – Maddak
    Sep 20 '17 at 19:36





















0














I've encountered the same problem, and it's really not easy to find a good fix (they're really very few results on google), so my solution is to fully reinstall pygobject in accordance with https://pygobject.readthedocs.io/en/latest/getting_started.html



sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0  
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
pip3 install pycairo
pip3 install PyGObject


(You need to apt install python3-pip beforehand.)



It worked perfectly for me.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f957502%2fgufw-not-launching-on-ubuntu-17-04%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Not sure what, if anything you might have done to cause this. Upgrade Ubuntu? How did you install UFW? From the repos?



    At any rate , that is sort of a non-specific error and might occur with other packages as well.



    As a first step try updating (“dist-upgrade”) to see if you have outdated or held packages.



    sudo apt-get update
    sudo apt-get dist-upgrade -f


    If that fails as a second step try re-installing python-apt



    See https://packages.ubuntu.com/zesty/python-apt



    sudo apt-get install --reinstall python-apt


    You could shorten those two commands, but I hope it is more clear to demonstrate the reinstallation of python-apt.






    share|improve this answer


























    • I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

      – Maddak
      Sep 20 '17 at 19:36


















    0














    Not sure what, if anything you might have done to cause this. Upgrade Ubuntu? How did you install UFW? From the repos?



    At any rate , that is sort of a non-specific error and might occur with other packages as well.



    As a first step try updating (“dist-upgrade”) to see if you have outdated or held packages.



    sudo apt-get update
    sudo apt-get dist-upgrade -f


    If that fails as a second step try re-installing python-apt



    See https://packages.ubuntu.com/zesty/python-apt



    sudo apt-get install --reinstall python-apt


    You could shorten those two commands, but I hope it is more clear to demonstrate the reinstallation of python-apt.






    share|improve this answer


























    • I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

      – Maddak
      Sep 20 '17 at 19:36
















    0












    0








    0







    Not sure what, if anything you might have done to cause this. Upgrade Ubuntu? How did you install UFW? From the repos?



    At any rate , that is sort of a non-specific error and might occur with other packages as well.



    As a first step try updating (“dist-upgrade”) to see if you have outdated or held packages.



    sudo apt-get update
    sudo apt-get dist-upgrade -f


    If that fails as a second step try re-installing python-apt



    See https://packages.ubuntu.com/zesty/python-apt



    sudo apt-get install --reinstall python-apt


    You could shorten those two commands, but I hope it is more clear to demonstrate the reinstallation of python-apt.






    share|improve this answer















    Not sure what, if anything you might have done to cause this. Upgrade Ubuntu? How did you install UFW? From the repos?



    At any rate , that is sort of a non-specific error and might occur with other packages as well.



    As a first step try updating (“dist-upgrade”) to see if you have outdated or held packages.



    sudo apt-get update
    sudo apt-get dist-upgrade -f


    If that fails as a second step try re-installing python-apt



    See https://packages.ubuntu.com/zesty/python-apt



    sudo apt-get install --reinstall python-apt


    You could shorten those two commands, but I hope it is more clear to demonstrate the reinstallation of python-apt.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 20 '17 at 8:51









    David Foerster

    28.5k1366112




    28.5k1366112










    answered Sep 20 '17 at 3:06









    PantherPanther

    79.7k14158259




    79.7k14158259













    • I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

      – Maddak
      Sep 20 '17 at 19:36





















    • I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

      – Maddak
      Sep 20 '17 at 19:36



















    I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

    – Maddak
    Sep 20 '17 at 19:36







    I've installed GUFW simply with: sudo apt-get install gufw unfortunately none of the steps you provided solved the problem. Upgrading Ubuntu had no effect either. What helped was a complete reinstall of the system. My guess is I must have messed something up with the default python. Thanks for looking into this

    – Maddak
    Sep 20 '17 at 19:36















    0














    I've encountered the same problem, and it's really not easy to find a good fix (they're really very few results on google), so my solution is to fully reinstall pygobject in accordance with https://pygobject.readthedocs.io/en/latest/getting_started.html



    sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0  
    sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
    pip3 install pycairo
    pip3 install PyGObject


    (You need to apt install python3-pip beforehand.)



    It worked perfectly for me.






    share|improve this answer






























      0














      I've encountered the same problem, and it's really not easy to find a good fix (they're really very few results on google), so my solution is to fully reinstall pygobject in accordance with https://pygobject.readthedocs.io/en/latest/getting_started.html



      sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0  
      sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
      pip3 install pycairo
      pip3 install PyGObject


      (You need to apt install python3-pip beforehand.)



      It worked perfectly for me.






      share|improve this answer




























        0












        0








        0







        I've encountered the same problem, and it's really not easy to find a good fix (they're really very few results on google), so my solution is to fully reinstall pygobject in accordance with https://pygobject.readthedocs.io/en/latest/getting_started.html



        sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0  
        sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
        pip3 install pycairo
        pip3 install PyGObject


        (You need to apt install python3-pip beforehand.)



        It worked perfectly for me.






        share|improve this answer















        I've encountered the same problem, and it's really not easy to find a good fix (they're really very few results on google), so my solution is to fully reinstall pygobject in accordance with https://pygobject.readthedocs.io/en/latest/getting_started.html



        sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0  
        sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
        pip3 install pycairo
        pip3 install PyGObject


        (You need to apt install python3-pip beforehand.)



        It worked perfectly for me.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 2 at 8:56

























        answered Feb 1 at 15:20









        lp177lp177

        12




        12






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f957502%2fgufw-not-launching-on-ubuntu-17-04%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            張江高科駅