Problem with update-manager: No module named 'apt_pkg' in Ubuntu 13.10, having installed Python 3.4 on...












0















I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu.13.10. I get:



jacopo@jacopo-laptop:~$ update-manager 
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
ImportError: No module named 'gi._gi'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API
ImportError: No module named 'gi._gi'


As far as I have understood, this is a problem related to the fact that I should have python3.4 installed. I installed it in /usr/local/ lib, but I always get the same error. In this way I can't even upgrade to Ubuntu 14.04.
Could someone help me?
Thanks in advance!



Jacopo










share|improve this question





























    0















    I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu.13.10. I get:



    jacopo@jacopo-laptop:~$ update-manager 
    Traceback (most recent call last):
    File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
    File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
    ImportError: No module named 'gi._gi'
    Error in sys.excepthook:
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
    File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
    File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
    File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
    File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
    import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
    import apt_pkg
    ImportError: No module named 'apt_pkg'

    Original exception was:
    Traceback (most recent call last):
    File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
    File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
    from ._gi import _API
    ImportError: No module named 'gi._gi'


    As far as I have understood, this is a problem related to the fact that I should have python3.4 installed. I installed it in /usr/local/ lib, but I always get the same error. In this way I can't even upgrade to Ubuntu 14.04.
    Could someone help me?
    Thanks in advance!



    Jacopo










    share|improve this question



























      0












      0








      0








      I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu.13.10. I get:



      jacopo@jacopo-laptop:~$ update-manager 
      Traceback (most recent call last):
      File "/usr/bin/update-manager", line 28, in <module>
      from gi.repository import Gtk
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
      ImportError: No module named 'gi._gi'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
      import apt_pkg
      ImportError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/update-manager", line 28, in <module>
      from gi.repository import Gtk
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
      from ._gi import _API
      ImportError: No module named 'gi._gi'


      As far as I have understood, this is a problem related to the fact that I should have python3.4 installed. I installed it in /usr/local/ lib, but I always get the same error. In this way I can't even upgrade to Ubuntu 14.04.
      Could someone help me?
      Thanks in advance!



      Jacopo










      share|improve this question
















      I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu.13.10. I get:



      jacopo@jacopo-laptop:~$ update-manager 
      Traceback (most recent call last):
      File "/usr/bin/update-manager", line 28, in <module>
      from gi.repository import Gtk
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
      ImportError: No module named 'gi._gi'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
      import apt_pkg
      ImportError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/update-manager", line 28, in <module>
      from gi.repository import Gtk
      File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
      from ._gi import _API
      ImportError: No module named 'gi._gi'


      As far as I have understood, this is a problem related to the fact that I should have python3.4 installed. I installed it in /usr/local/ lib, but I always get the same error. In this way I can't even upgrade to Ubuntu 14.04.
      Could someone help me?
      Thanks in advance!



      Jacopo







      13.10 apt update-manager python3






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 9 '14 at 14:12







      user291925

















      asked Jun 9 '14 at 13:59









      user291925user291925

      6112




      6112






















          5 Answers
          5






          active

          oldest

          votes


















          2














          If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:



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





          share|improve this answer
























          • Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

            – user291925
            Jun 9 '14 at 14:22













          • K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

            – Charles Green
            Jun 9 '14 at 14:28











          • Thanks! I tried, but I still get the same error when running update-manager

            – user291925
            Jun 9 '14 at 15:12











          • K - that about exhausts my possibilities with out a more extensive web search. Good luck!

            – Charles Green
            Jun 9 '14 at 15:22



















          2














          This may help:



          I first uninstalled apt_pkg using:



          sudo apt-get remove python3-apt


          and then reinstalled the package using:



          sudo apt-get install python3-apt


          The error is primarily because of library apt_pkg.cpython-35m-x86_64-linux-gnu.so not being present in /usr/lib/python3/dist-packages.



          Removing and reinstalling helps.






          share|improve this answer





















          • 1





            It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

            – Zanna
            Aug 8 '18 at 7:58





















          0














          I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.






          share|improve this answer































            0














            Just in case it helps another, I finally solved this problem, that was apparently caused by python version conflicts, by redirecting the link python3, then redirecting it to the right python version:



            sudo rm /usr/bin/python3
            sudo ln -s /usr/bin/python3.4


            You may need to enter the correct python version, found with



            python3 -V





            share|improve this answer
























            • So you removed one version for 3.4 ?

              – ThePassenger
              Jul 20 '18 at 13:49





















            0














            for me the following steps worked:



            cd /usr/lib/python3/dist-packages
            sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so


            the original solution is here: https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg/36232975#36232975






            share|improve this answer








            New contributor




            Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              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%2f480908%2fproblem-with-update-manager-no-module-named-apt-pkg-in-ubuntu-13-10-having-i%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:



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





              share|improve this answer
























              • Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

                – user291925
                Jun 9 '14 at 14:22













              • K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

                – Charles Green
                Jun 9 '14 at 14:28











              • Thanks! I tried, but I still get the same error when running update-manager

                – user291925
                Jun 9 '14 at 15:12











              • K - that about exhausts my possibilities with out a more extensive web search. Good luck!

                – Charles Green
                Jun 9 '14 at 15:22
















              2














              If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:



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





              share|improve this answer
























              • Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

                – user291925
                Jun 9 '14 at 14:22













              • K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

                – Charles Green
                Jun 9 '14 at 14:28











              • Thanks! I tried, but I still get the same error when running update-manager

                – user291925
                Jun 9 '14 at 15:12











              • K - that about exhausts my possibilities with out a more extensive web search. Good luck!

                – Charles Green
                Jun 9 '14 at 15:22














              2












              2








              2







              If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:



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





              share|improve this answer













              If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:



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






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 9 '14 at 14:14









              Charles GreenCharles Green

              13.8k73858




              13.8k73858













              • Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

                – user291925
                Jun 9 '14 at 14:22













              • K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

                – Charles Green
                Jun 9 '14 at 14:28











              • Thanks! I tried, but I still get the same error when running update-manager

                – user291925
                Jun 9 '14 at 15:12











              • K - that about exhausts my possibilities with out a more extensive web search. Good luck!

                – Charles Green
                Jun 9 '14 at 15:22



















              • Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

                – user291925
                Jun 9 '14 at 14:22













              • K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

                – Charles Green
                Jun 9 '14 at 14:28











              • Thanks! I tried, but I still get the same error when running update-manager

                – user291925
                Jun 9 '14 at 15:12











              • K - that about exhausts my possibilities with out a more extensive web search. Good luck!

                – Charles Green
                Jun 9 '14 at 15:22

















              Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

              – user291925
              Jun 9 '14 at 14:22







              Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-updates_main_source_Sources Hash Sum mismatch

              – user291925
              Jun 9 '14 at 14:22















              K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

              – Charles Green
              Jun 9 '14 at 14:28





              K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/…

              – Charles Green
              Jun 9 '14 at 14:28













              Thanks! I tried, but I still get the same error when running update-manager

              – user291925
              Jun 9 '14 at 15:12





              Thanks! I tried, but I still get the same error when running update-manager

              – user291925
              Jun 9 '14 at 15:12













              K - that about exhausts my possibilities with out a more extensive web search. Good luck!

              – Charles Green
              Jun 9 '14 at 15:22





              K - that about exhausts my possibilities with out a more extensive web search. Good luck!

              – Charles Green
              Jun 9 '14 at 15:22













              2














              This may help:



              I first uninstalled apt_pkg using:



              sudo apt-get remove python3-apt


              and then reinstalled the package using:



              sudo apt-get install python3-apt


              The error is primarily because of library apt_pkg.cpython-35m-x86_64-linux-gnu.so not being present in /usr/lib/python3/dist-packages.



              Removing and reinstalling helps.






              share|improve this answer





















              • 1





                It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

                – Zanna
                Aug 8 '18 at 7:58


















              2














              This may help:



              I first uninstalled apt_pkg using:



              sudo apt-get remove python3-apt


              and then reinstalled the package using:



              sudo apt-get install python3-apt


              The error is primarily because of library apt_pkg.cpython-35m-x86_64-linux-gnu.so not being present in /usr/lib/python3/dist-packages.



              Removing and reinstalling helps.






              share|improve this answer





















              • 1





                It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

                – Zanna
                Aug 8 '18 at 7:58
















              2












              2








              2







              This may help:



              I first uninstalled apt_pkg using:



              sudo apt-get remove python3-apt


              and then reinstalled the package using:



              sudo apt-get install python3-apt


              The error is primarily because of library apt_pkg.cpython-35m-x86_64-linux-gnu.so not being present in /usr/lib/python3/dist-packages.



              Removing and reinstalling helps.






              share|improve this answer















              This may help:



              I first uninstalled apt_pkg using:



              sudo apt-get remove python3-apt


              and then reinstalled the package using:



              sudo apt-get install python3-apt


              The error is primarily because of library apt_pkg.cpython-35m-x86_64-linux-gnu.so not being present in /usr/lib/python3/dist-packages.



              Removing and reinstalling helps.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 7 '18 at 11:43









              jonathan

              22727




              22727










              answered Aug 8 '18 at 7:21









              vikas kapdoskarvikas kapdoskar

              211




              211








              • 1





                It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

                – Zanna
                Aug 8 '18 at 7:58
















              • 1





                It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

                – Zanna
                Aug 8 '18 at 7:58










              1




              1





              It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

              – Zanna
              Aug 8 '18 at 7:58







              It's almost always preferable to reinstall the package in one step using sudo apt install --reinstall <package-name>, because this avoids calculating and removing dependencies (and marking packages for removal). Be aware that removing packages is not always a reversible procedure; for example APT will remove itself or its dependencies if asked to! The --reinstall flag is therefore much safer than remove followed by install. The remove command by itself does not remove configuration files of a package so has no benefit over install --reinstall.

              – Zanna
              Aug 8 '18 at 7:58













              0














              I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.






              share|improve this answer




























                0














                I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.






                share|improve this answer


























                  0












                  0








                  0







                  I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.






                  share|improve this answer













                  I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 22 '14 at 11:19









                  Renju chingathRenju chingath

                  1013




                  1013























                      0














                      Just in case it helps another, I finally solved this problem, that was apparently caused by python version conflicts, by redirecting the link python3, then redirecting it to the right python version:



                      sudo rm /usr/bin/python3
                      sudo ln -s /usr/bin/python3.4


                      You may need to enter the correct python version, found with



                      python3 -V





                      share|improve this answer
























                      • So you removed one version for 3.4 ?

                        – ThePassenger
                        Jul 20 '18 at 13:49


















                      0














                      Just in case it helps another, I finally solved this problem, that was apparently caused by python version conflicts, by redirecting the link python3, then redirecting it to the right python version:



                      sudo rm /usr/bin/python3
                      sudo ln -s /usr/bin/python3.4


                      You may need to enter the correct python version, found with



                      python3 -V





                      share|improve this answer
























                      • So you removed one version for 3.4 ?

                        – ThePassenger
                        Jul 20 '18 at 13:49
















                      0












                      0








                      0







                      Just in case it helps another, I finally solved this problem, that was apparently caused by python version conflicts, by redirecting the link python3, then redirecting it to the right python version:



                      sudo rm /usr/bin/python3
                      sudo ln -s /usr/bin/python3.4


                      You may need to enter the correct python version, found with



                      python3 -V





                      share|improve this answer













                      Just in case it helps another, I finally solved this problem, that was apparently caused by python version conflicts, by redirecting the link python3, then redirecting it to the right python version:



                      sudo rm /usr/bin/python3
                      sudo ln -s /usr/bin/python3.4


                      You may need to enter the correct python version, found with



                      python3 -V






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 5 '18 at 16:14









                      matthias2tmatthias2t

                      111




                      111













                      • So you removed one version for 3.4 ?

                        – ThePassenger
                        Jul 20 '18 at 13:49





















                      • So you removed one version for 3.4 ?

                        – ThePassenger
                        Jul 20 '18 at 13:49



















                      So you removed one version for 3.4 ?

                      – ThePassenger
                      Jul 20 '18 at 13:49







                      So you removed one version for 3.4 ?

                      – ThePassenger
                      Jul 20 '18 at 13:49













                      0














                      for me the following steps worked:



                      cd /usr/lib/python3/dist-packages
                      sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so


                      the original solution is here: https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg/36232975#36232975






                      share|improve this answer








                      New contributor




                      Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        for me the following steps worked:



                        cd /usr/lib/python3/dist-packages
                        sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so


                        the original solution is here: https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg/36232975#36232975






                        share|improve this answer








                        New contributor




                        Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          for me the following steps worked:



                          cd /usr/lib/python3/dist-packages
                          sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so


                          the original solution is here: https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg/36232975#36232975






                          share|improve this answer








                          New contributor




                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          for me the following steps worked:



                          cd /usr/lib/python3/dist-packages
                          sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so


                          the original solution is here: https://stackoverflow.com/questions/13708180/python-dev-installation-error-importerror-no-module-named-apt-pkg/36232975#36232975







                          share|improve this answer








                          New contributor




                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer






                          New contributor




                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 10 hours ago









                          Olimjon IbragimovOlimjon Ibragimov

                          1




                          1




                          New contributor




                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Olimjon Ibragimov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              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%2f480908%2fproblem-with-update-manager-no-module-named-apt-pkg-in-ubuntu-13-10-having-i%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

                              Category:香港粉麵

                              List *all* the tuples!

                              Channel [V]