pipenv `ModuleNotFoundError: No module named 'pip.basecommand`












2















I'm trying to create a virtual environment using pipenv. When I give the command pipenv install, I get the following error



I am using pipenv==2018.6.25




Traceback (most recent call last):
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 33, in do_import
_tmp = importlib.import_module(internal)
File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pip._internal.basecommand'




During handling of the above exception, another exception occurred:




Traceback (most recent call last):
File "c:programdataanaconda3librunpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:programdataanaconda3librunpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:ProgramDataAnaconda3Scriptspipenv.exe__main__.py", line 5, in
File "c:programdataanaconda3libsite-packagespipenv__init__.py", line 23, in
from .cli import cli
File "c:programdataanaconda3libsite-packagespipenvcli.py", line 26, in
from .utils import is_valid_url
File "c:programdataanaconda3libsite-packagespipenvutils.py", line 59, in
from .vendor.requirementslib import Requirement
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib__init__.py", line 6, in
from .models import Requirement, Lockfile, Pipfile
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodels__init__.py", line 8, in
from .requirements import Requirement
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsrequirements.py", line 15, in
from .markers import PipenvMarkers
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsmarkers.py", line 6, in
from .utils import validate_markers, filter_none
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsutils.py", line 9, in
from .._compat import Link
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 55, in
Command = do_import("basecommand", "Command")
File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 35, in do_import
_tmp = importlib.import_module(pip9)
File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'pip.basecommand'




Anybody has any idea how I can correct this error?










share|improve this question





























    2















    I'm trying to create a virtual environment using pipenv. When I give the command pipenv install, I get the following error



    I am using pipenv==2018.6.25




    Traceback (most recent call last):
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 33, in do_import
    _tmp = importlib.import_module(internal)
    File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 994, in _gcd_import
    File "", line 971, in _find_and_load
    File "", line 953, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'pip._internal.basecommand'




    During handling of the above exception, another exception occurred:




    Traceback (most recent call last):
    File "c:programdataanaconda3librunpy.py", line 193, in _run_module_as_main
    "main", mod_spec)
    File "c:programdataanaconda3librunpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "C:ProgramDataAnaconda3Scriptspipenv.exe__main__.py", line 5, in
    File "c:programdataanaconda3libsite-packagespipenv__init__.py", line 23, in
    from .cli import cli
    File "c:programdataanaconda3libsite-packagespipenvcli.py", line 26, in
    from .utils import is_valid_url
    File "c:programdataanaconda3libsite-packagespipenvutils.py", line 59, in
    from .vendor.requirementslib import Requirement
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib__init__.py", line 6, in
    from .models import Requirement, Lockfile, Pipfile
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodels__init__.py", line 8, in
    from .requirements import Requirement
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsrequirements.py", line 15, in
    from .markers import PipenvMarkers
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsmarkers.py", line 6, in
    from .utils import validate_markers, filter_none
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsutils.py", line 9, in
    from .._compat import Link
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 55, in
    Command = do_import("basecommand", "Command")
    File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 35, in do_import
    _tmp = importlib.import_module(pip9)
    File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'pip.basecommand'




    Anybody has any idea how I can correct this error?










    share|improve this question



























      2












      2








      2


      2






      I'm trying to create a virtual environment using pipenv. When I give the command pipenv install, I get the following error



      I am using pipenv==2018.6.25




      Traceback (most recent call last):
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 33, in do_import
      _tmp = importlib.import_module(internal)
      File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
      File "", line 994, in _gcd_import
      File "", line 971, in _find_and_load
      File "", line 953, in _find_and_load_unlocked
      ModuleNotFoundError: No module named 'pip._internal.basecommand'




      During handling of the above exception, another exception occurred:




      Traceback (most recent call last):
      File "c:programdataanaconda3librunpy.py", line 193, in _run_module_as_main
      "main", mod_spec)
      File "c:programdataanaconda3librunpy.py", line 85, in _run_code
      exec(code, run_globals)
      File "C:ProgramDataAnaconda3Scriptspipenv.exe__main__.py", line 5, in
      File "c:programdataanaconda3libsite-packagespipenv__init__.py", line 23, in
      from .cli import cli
      File "c:programdataanaconda3libsite-packagespipenvcli.py", line 26, in
      from .utils import is_valid_url
      File "c:programdataanaconda3libsite-packagespipenvutils.py", line 59, in
      from .vendor.requirementslib import Requirement
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib__init__.py", line 6, in
      from .models import Requirement, Lockfile, Pipfile
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodels__init__.py", line 8, in
      from .requirements import Requirement
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsrequirements.py", line 15, in
      from .markers import PipenvMarkers
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsmarkers.py", line 6, in
      from .utils import validate_markers, filter_none
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsutils.py", line 9, in
      from .._compat import Link
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 55, in
      Command = do_import("basecommand", "Command")
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 35, in do_import
      _tmp = importlib.import_module(pip9)
      File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
      ModuleNotFoundError: No module named 'pip.basecommand'




      Anybody has any idea how I can correct this error?










      share|improve this question
















      I'm trying to create a virtual environment using pipenv. When I give the command pipenv install, I get the following error



      I am using pipenv==2018.6.25




      Traceback (most recent call last):
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 33, in do_import
      _tmp = importlib.import_module(internal)
      File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
      File "", line 994, in _gcd_import
      File "", line 971, in _find_and_load
      File "", line 953, in _find_and_load_unlocked
      ModuleNotFoundError: No module named 'pip._internal.basecommand'




      During handling of the above exception, another exception occurred:




      Traceback (most recent call last):
      File "c:programdataanaconda3librunpy.py", line 193, in _run_module_as_main
      "main", mod_spec)
      File "c:programdataanaconda3librunpy.py", line 85, in _run_code
      exec(code, run_globals)
      File "C:ProgramDataAnaconda3Scriptspipenv.exe__main__.py", line 5, in
      File "c:programdataanaconda3libsite-packagespipenv__init__.py", line 23, in
      from .cli import cli
      File "c:programdataanaconda3libsite-packagespipenvcli.py", line 26, in
      from .utils import is_valid_url
      File "c:programdataanaconda3libsite-packagespipenvutils.py", line 59, in
      from .vendor.requirementslib import Requirement
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib__init__.py", line 6, in
      from .models import Requirement, Lockfile, Pipfile
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodels__init__.py", line 8, in
      from .requirements import Requirement
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsrequirements.py", line 15, in
      from .markers import PipenvMarkers
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsmarkers.py", line 6, in
      from .utils import validate_markers, filter_none
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslibmodelsutils.py", line 9, in
      from .._compat import Link
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 55, in
      Command = do_import("basecommand", "Command")
      File "c:programdataanaconda3libsite-packagespipenvvendorrequirementslib_compat.py", line 35, in do_import
      _tmp = importlib.import_module(pip9)
      File "c:programdataanaconda3libimportlib__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
      ModuleNotFoundError: No module named 'pip.basecommand'




      Anybody has any idea how I can correct this error?







      pipenv virtual-environment






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 5 '18 at 12:35







      chidimo

















      asked Nov 5 '18 at 11:30









      chidimochidimo

      775921




      775921
























          2 Answers
          2






          active

          oldest

          votes


















          0














          I just ran into a similar error during pipenv lock.



          After updating pipenv via pip install --user --upgrade pipenv and pip via python -m pip install --upgrade pip the lock command resulted in an error message rather than the traceback.
          This error message stated:




          There are incompatible versions in the resolved dependencies.







          share|improve this answer































            0














            I encountered this issue with pip 18.0 in Mac for virtual environment using pipenv (failing the pipfile.lock creation with this error message: "ModuleNotFoundError: No module named 'pip.basecommand'").
            It was solved by pip install --user --upgrade pipenv to update pipenv (to pipenv-2018.11.14.).






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              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%2fstackoverflow.com%2fquestions%2f53153533%2fpipenv-modulenotfounderror-no-module-named-pip-basecommand%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














              I just ran into a similar error during pipenv lock.



              After updating pipenv via pip install --user --upgrade pipenv and pip via python -m pip install --upgrade pip the lock command resulted in an error message rather than the traceback.
              This error message stated:




              There are incompatible versions in the resolved dependencies.







              share|improve this answer




























                0














                I just ran into a similar error during pipenv lock.



                After updating pipenv via pip install --user --upgrade pipenv and pip via python -m pip install --upgrade pip the lock command resulted in an error message rather than the traceback.
                This error message stated:




                There are incompatible versions in the resolved dependencies.







                share|improve this answer


























                  0












                  0








                  0







                  I just ran into a similar error during pipenv lock.



                  After updating pipenv via pip install --user --upgrade pipenv and pip via python -m pip install --upgrade pip the lock command resulted in an error message rather than the traceback.
                  This error message stated:




                  There are incompatible versions in the resolved dependencies.







                  share|improve this answer













                  I just ran into a similar error during pipenv lock.



                  After updating pipenv via pip install --user --upgrade pipenv and pip via python -m pip install --upgrade pip the lock command resulted in an error message rather than the traceback.
                  This error message stated:




                  There are incompatible versions in the resolved dependencies.








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 5 '18 at 21:19









                  yvesoyveso

                  185




                  185

























                      0














                      I encountered this issue with pip 18.0 in Mac for virtual environment using pipenv (failing the pipfile.lock creation with this error message: "ModuleNotFoundError: No module named 'pip.basecommand'").
                      It was solved by pip install --user --upgrade pipenv to update pipenv (to pipenv-2018.11.14.).






                      share|improve this answer




























                        0














                        I encountered this issue with pip 18.0 in Mac for virtual environment using pipenv (failing the pipfile.lock creation with this error message: "ModuleNotFoundError: No module named 'pip.basecommand'").
                        It was solved by pip install --user --upgrade pipenv to update pipenv (to pipenv-2018.11.14.).






                        share|improve this answer


























                          0












                          0








                          0







                          I encountered this issue with pip 18.0 in Mac for virtual environment using pipenv (failing the pipfile.lock creation with this error message: "ModuleNotFoundError: No module named 'pip.basecommand'").
                          It was solved by pip install --user --upgrade pipenv to update pipenv (to pipenv-2018.11.14.).






                          share|improve this answer













                          I encountered this issue with pip 18.0 in Mac for virtual environment using pipenv (failing the pipfile.lock creation with this error message: "ModuleNotFoundError: No module named 'pip.basecommand'").
                          It was solved by pip install --user --upgrade pipenv to update pipenv (to pipenv-2018.11.14.).







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 22 '18 at 16:39









                          Rohullah AbdullahpourRohullah Abdullahpour

                          12




                          12






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • 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%2fstackoverflow.com%2fquestions%2f53153533%2fpipenv-modulenotfounderror-no-module-named-pip-basecommand%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