pip install gives “TypeError: 'int' object is not iterable ”

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












1















In Debian Stretch, when I try to install the python package python-constraint via



pip install python-constraint


I get the following error;



Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /home/von/.pip/pip.log


In Debian Jessie the same command is sucessful.



Where is the problem? How to solve it?



$python --version
Python 2.7.9

$pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)









share|improve this question




























    1















    In Debian Stretch, when I try to install the python package python-constraint via



    pip install python-constraint


    I get the following error;



    Exception:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
    File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
    File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
    File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
    elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
    File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
    TypeError: 'int' object is not iterable

    Storing debug log for failure in /home/von/.pip/pip.log


    In Debian Jessie the same command is sucessful.



    Where is the problem? How to solve it?



    $python --version
    Python 2.7.9

    $pip --version
    pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)









    share|improve this question


























      1












      1








      1


      0






      In Debian Stretch, when I try to install the python package python-constraint via



      pip install python-constraint


      I get the following error;



      Exception:
      Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
      status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
      requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
      url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
      File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
      elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
      File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
      return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
      TypeError: 'int' object is not iterable

      Storing debug log for failure in /home/von/.pip/pip.log


      In Debian Jessie the same command is sucessful.



      Where is the problem? How to solve it?



      $python --version
      Python 2.7.9

      $pip --version
      pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)









      share|improve this question
















      In Debian Stretch, when I try to install the python package python-constraint via



      pip install python-constraint


      I get the following error;



      Exception:
      Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
      status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
      requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
      url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
      File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
      elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
      File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
      return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
      TypeError: 'int' object is not iterable

      Storing debug log for failure in /home/von/.pip/pip.log


      In Debian Jessie the same command is sucessful.



      Where is the problem? How to solve it?



      $python --version
      Python 2.7.9

      $pip --version
      pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)






      debian python pip






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 14 '15 at 18:47







      Ortomala Lokni

















      asked May 28 '15 at 15:45









      Ortomala LokniOrtomala Lokni

      2,19511442




      2,19511442




















          2 Answers
          2






          active

          oldest

          votes


















          5














          The error is related to the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786580



          The solution is to downgrade python-distlib and python-distlib-whl to the stable (jessie) version.



          wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb
          wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib-whl_0.1.9-1_all.deb
          dpkg -i python-distlib_0.1.9-1_all.deb
          dpkg -i python-distlib-whl_0.1.9-1_all.deb


          After that running pip install is sucessful.



          $ sudo pip install python-constraint
          Downloading/unpacking python-constraint
          Downloading python-constraint-1.2.tar.bz2
          Running setup.py (path:/tmp/pip-build-JeOIzg/python-constraint/setup.py) egg_info for package python-constraint

          Installing collected packages: python-constraint
          Running setup.py install for python-constraint

          Successfully installed python-constraint
          Cleaning up...


          Put the packages on hold, and wait for an official bug fix.



          sudo aptitude hold python-distlib python-distlib-whl





          share|improve this answer

























          • you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

            – Willian Paixao
            May 28 '15 at 20:22


















          0














          I ran into this on Raspbian trying to install a different package, and pip couldn't update itself due to the same error. Upgrading pip using apt-get solved it:



          sudo apt-get install python3-pip





          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f206121%2fpip-install-gives-typeerror-int-object-is-not-iterable%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









            5














            The error is related to the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786580



            The solution is to downgrade python-distlib and python-distlib-whl to the stable (jessie) version.



            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb
            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib-whl_0.1.9-1_all.deb
            dpkg -i python-distlib_0.1.9-1_all.deb
            dpkg -i python-distlib-whl_0.1.9-1_all.deb


            After that running pip install is sucessful.



            $ sudo pip install python-constraint
            Downloading/unpacking python-constraint
            Downloading python-constraint-1.2.tar.bz2
            Running setup.py (path:/tmp/pip-build-JeOIzg/python-constraint/setup.py) egg_info for package python-constraint

            Installing collected packages: python-constraint
            Running setup.py install for python-constraint

            Successfully installed python-constraint
            Cleaning up...


            Put the packages on hold, and wait for an official bug fix.



            sudo aptitude hold python-distlib python-distlib-whl





            share|improve this answer

























            • you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

              – Willian Paixao
              May 28 '15 at 20:22















            5














            The error is related to the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786580



            The solution is to downgrade python-distlib and python-distlib-whl to the stable (jessie) version.



            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb
            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib-whl_0.1.9-1_all.deb
            dpkg -i python-distlib_0.1.9-1_all.deb
            dpkg -i python-distlib-whl_0.1.9-1_all.deb


            After that running pip install is sucessful.



            $ sudo pip install python-constraint
            Downloading/unpacking python-constraint
            Downloading python-constraint-1.2.tar.bz2
            Running setup.py (path:/tmp/pip-build-JeOIzg/python-constraint/setup.py) egg_info for package python-constraint

            Installing collected packages: python-constraint
            Running setup.py install for python-constraint

            Successfully installed python-constraint
            Cleaning up...


            Put the packages on hold, and wait for an official bug fix.



            sudo aptitude hold python-distlib python-distlib-whl





            share|improve this answer

























            • you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

              – Willian Paixao
              May 28 '15 at 20:22













            5












            5








            5







            The error is related to the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786580



            The solution is to downgrade python-distlib and python-distlib-whl to the stable (jessie) version.



            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb
            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib-whl_0.1.9-1_all.deb
            dpkg -i python-distlib_0.1.9-1_all.deb
            dpkg -i python-distlib-whl_0.1.9-1_all.deb


            After that running pip install is sucessful.



            $ sudo pip install python-constraint
            Downloading/unpacking python-constraint
            Downloading python-constraint-1.2.tar.bz2
            Running setup.py (path:/tmp/pip-build-JeOIzg/python-constraint/setup.py) egg_info for package python-constraint

            Installing collected packages: python-constraint
            Running setup.py install for python-constraint

            Successfully installed python-constraint
            Cleaning up...


            Put the packages on hold, and wait for an official bug fix.



            sudo aptitude hold python-distlib python-distlib-whl





            share|improve this answer















            The error is related to the bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786580



            The solution is to downgrade python-distlib and python-distlib-whl to the stable (jessie) version.



            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb
            wget http://ftp.debian.org/debian/pool/main/d/distlib/python-distlib-whl_0.1.9-1_all.deb
            dpkg -i python-distlib_0.1.9-1_all.deb
            dpkg -i python-distlib-whl_0.1.9-1_all.deb


            After that running pip install is sucessful.



            $ sudo pip install python-constraint
            Downloading/unpacking python-constraint
            Downloading python-constraint-1.2.tar.bz2
            Running setup.py (path:/tmp/pip-build-JeOIzg/python-constraint/setup.py) egg_info for package python-constraint

            Installing collected packages: python-constraint
            Running setup.py install for python-constraint

            Successfully installed python-constraint
            Cleaning up...


            Put the packages on hold, and wait for an official bug fix.



            sudo aptitude hold python-distlib python-distlib-whl






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 28 '15 at 20:13

























            answered May 28 '15 at 16:39









            Ortomala LokniOrtomala Lokni

            2,19511442




            2,19511442












            • you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

              – Willian Paixao
              May 28 '15 at 20:22

















            • you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

              – Willian Paixao
              May 28 '15 at 20:22
















            you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

            – Willian Paixao
            May 28 '15 at 20:22





            you're right. I had the same problem two days ago. And your answer was also my solution. Vote up for you.

            – Willian Paixao
            May 28 '15 at 20:22













            0














            I ran into this on Raspbian trying to install a different package, and pip couldn't update itself due to the same error. Upgrading pip using apt-get solved it:



            sudo apt-get install python3-pip





            share|improve this answer



























              0














              I ran into this on Raspbian trying to install a different package, and pip couldn't update itself due to the same error. Upgrading pip using apt-get solved it:



              sudo apt-get install python3-pip





              share|improve this answer

























                0












                0








                0







                I ran into this on Raspbian trying to install a different package, and pip couldn't update itself due to the same error. Upgrading pip using apt-get solved it:



                sudo apt-get install python3-pip





                share|improve this answer













                I ran into this on Raspbian trying to install a different package, and pip couldn't update itself due to the same error. Upgrading pip using apt-get solved it:



                sudo apt-get install python3-pip






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 24 at 8:53









                evan_bevan_b

                1011




                1011



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f206121%2fpip-install-gives-typeerror-int-object-is-not-iterable%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

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?