ImportError: cannot import name 'main' after installing python3.6 and pipenv

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












After installing python3.6 and pipenv I tried to install requests with the command pip3 install requests and getting this error-



`Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'`


Here is how I installed python3.6



$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install libssl-dev openssl libreadline-dev

$ cd ~

$ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

$ tar zxf Python-3.6.1.tgz

$ cd Python-3.6.1

$ ./configure

$ make

$ sudo make install


And here is how I installed pip env-
pip3 install pipenv



After that i started getting that error.
I have tried uninstalling python, python3, python-pip, python3-pip using below commands



$ sudo apt purge python

$ sudo apt purge python3

$ sudo apt purge python-pip

$ sudo apt purge python3-pip


Then installed them again using below commands
$ sudo apt install python



$ sudo apt install python3

$ sudo apt install python-pip

$ sudo apt install python3-pip


But still getting that error. Also I always used sudo apt-get update before using those commands.
After installing python3 again. When i check the version using the command python3 -V it shows python 3.6
How can I fix this problem?







share|improve this question


























    up vote
    0
    down vote

    favorite












    After installing python3.6 and pipenv I tried to install requests with the command pip3 install requests and getting this error-



    `Traceback (most recent call last):
    File "/usr/bin/pip3", line 9, in <module>
    from pip import main
    ImportError: cannot import name 'main'`


    Here is how I installed python3.6



    $ sudo apt-get update

    $ sudo apt-get upgrade

    $ sudo apt-get install libssl-dev openssl libreadline-dev

    $ cd ~

    $ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

    $ tar zxf Python-3.6.1.tgz

    $ cd Python-3.6.1

    $ ./configure

    $ make

    $ sudo make install


    And here is how I installed pip env-
    pip3 install pipenv



    After that i started getting that error.
    I have tried uninstalling python, python3, python-pip, python3-pip using below commands



    $ sudo apt purge python

    $ sudo apt purge python3

    $ sudo apt purge python-pip

    $ sudo apt purge python3-pip


    Then installed them again using below commands
    $ sudo apt install python



    $ sudo apt install python3

    $ sudo apt install python-pip

    $ sudo apt install python3-pip


    But still getting that error. Also I always used sudo apt-get update before using those commands.
    After installing python3 again. When i check the version using the command python3 -V it shows python 3.6
    How can I fix this problem?







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      After installing python3.6 and pipenv I tried to install requests with the command pip3 install requests and getting this error-



      `Traceback (most recent call last):
      File "/usr/bin/pip3", line 9, in <module>
      from pip import main
      ImportError: cannot import name 'main'`


      Here is how I installed python3.6



      $ sudo apt-get update

      $ sudo apt-get upgrade

      $ sudo apt-get install libssl-dev openssl libreadline-dev

      $ cd ~

      $ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

      $ tar zxf Python-3.6.1.tgz

      $ cd Python-3.6.1

      $ ./configure

      $ make

      $ sudo make install


      And here is how I installed pip env-
      pip3 install pipenv



      After that i started getting that error.
      I have tried uninstalling python, python3, python-pip, python3-pip using below commands



      $ sudo apt purge python

      $ sudo apt purge python3

      $ sudo apt purge python-pip

      $ sudo apt purge python3-pip


      Then installed them again using below commands
      $ sudo apt install python



      $ sudo apt install python3

      $ sudo apt install python-pip

      $ sudo apt install python3-pip


      But still getting that error. Also I always used sudo apt-get update before using those commands.
      After installing python3 again. When i check the version using the command python3 -V it shows python 3.6
      How can I fix this problem?







      share|improve this question














      After installing python3.6 and pipenv I tried to install requests with the command pip3 install requests and getting this error-



      `Traceback (most recent call last):
      File "/usr/bin/pip3", line 9, in <module>
      from pip import main
      ImportError: cannot import name 'main'`


      Here is how I installed python3.6



      $ sudo apt-get update

      $ sudo apt-get upgrade

      $ sudo apt-get install libssl-dev openssl libreadline-dev

      $ cd ~

      $ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

      $ tar zxf Python-3.6.1.tgz

      $ cd Python-3.6.1

      $ ./configure

      $ make

      $ sudo make install


      And here is how I installed pip env-
      pip3 install pipenv



      After that i started getting that error.
      I have tried uninstalling python, python3, python-pip, python3-pip using below commands



      $ sudo apt purge python

      $ sudo apt purge python3

      $ sudo apt purge python-pip

      $ sudo apt purge python3-pip


      Then installed them again using below commands
      $ sudo apt install python



      $ sudo apt install python3

      $ sudo apt install python-pip

      $ sudo apt install python3-pip


      But still getting that error. Also I always used sudo apt-get update before using those commands.
      After installing python3 again. When i check the version using the command python3 -V it shows python 3.6
      How can I fix this problem?









      share|improve this question













      share|improve this question




      share|improve this question








      edited May 25 at 10:14

























      asked May 23 at 15:15









      Bangladesh 71

      113




      113

























          active

          oldest

          votes











          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f1039464%2fimporterror-cannot-import-name-main-after-installing-python3-6-and-pipenv%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039464%2fimporterror-cannot-import-name-main-after-installing-python3-6-and-pipenv%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491