'NoneType' object has no attribute 'decompressobj' while installing Bootstrap setuptools Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionPython not recognizing LD_LIBRARY_PATH?How can i fix the following gmp library dependency error while trying to install Charm?Receiving “Unable to correct problems, you have held broken packages.” after trying to install python -setuptools and python-pipHow to install Python on CentOS without root privileges?Make python 2.7 the default python in centos, making an alias didn't workJenkins, Python and roothow to link pip to python3Where is pdfwriter.py located?Installed Electrum does not start and now Electrum-Ltc no longer works - update python/urllib3?dpkg returns error when installing python package (Debian)

Unexpected result with right shift after bitwise negation

Fishing simulator

What would be Julian Assange's expected punishment, on the current English criminal law?

Mortgage adviser recommends a longer term than necessary combined with overpayments

I'm thinking of a number

How do I keep my slimes from escaping their pens?

New Order #5: where Fibonacci and Beatty meet at Wythoff

What do you call a plan that's an alternative plan in case your initial plan fails?

Classification of bundles, Postnikov towers, obstruction theory, local coefficients

Complexity of many constant time steps with occasional logarithmic steps

Can I throw a longsword at someone?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?

3 doors, three guards, one stone

What was the last x86 CPU that did not have the x87 floating-point unit built in?

How to rotate it perfectly?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Estimate capacitor parameters

Notation for two qubit composite product state

Strange behaviour of Check

Why does tar appear to skip file contents when output file is /dev/null?

What is the largest species of polychaete?

When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?

Stars Make Stars



'NoneType' object has no attribute 'decompressobj' while installing Bootstrap setuptools



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionPython not recognizing LD_LIBRARY_PATH?How can i fix the following gmp library dependency error while trying to install Charm?Receiving “Unable to correct problems, you have held broken packages.” after trying to install python -setuptools and python-pipHow to install Python on CentOS without root privileges?Make python 2.7 the default python in centos, making an alias didn't workJenkins, Python and roothow to link pip to python3Where is pdfwriter.py located?Installed Electrum does not start and now Electrum-Ltc no longer works - update python/urllib3?dpkg returns error when installing python package (Debian)



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I am trying to install python 3.2, and to get setuptools and pip in python 3.2. Everything seems to work right in python 2.7. However when I try to install setuptools using this code wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3.2 I get the following error



Extracting in /tmp/tmpcwnav_
Traceback (most recent call last):
File "<stdin>", line 332, in <module>
File "<stdin>", line 329, in main
File "<stdin>", line 51, in _install
File "/usr/local/lib/python3.2/contextlib.py", line 28, in __enter__
return next(self.gen)
File "<stdin>", line 101, in archive_context
File "/usr/local/lib/python3.2/zipfile.py", line 1004, in extractall
self.extract(zipinfo, path, pwd)
File "/usr/local/lib/python3.2/zipfile.py", line 992, in extract
return self._extract_member(member, path, pwd)
File "/usr/local/lib/python3.2/zipfile.py", line 1035, in _extract_member
source = self.open(member, pwd=pwd)
File "/usr/local/lib/python3.2/zipfile.py", line 978, in open
close_fileobj=not self._filePassed)
File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__
self._decompressor = zlib.decompressobj(-15)
AttributeError: 'NoneType' object has no attribute 'decompressobj'


Based on some googling, it looks like I am getting the problem because zlib has not been installed. I do not have this problem when trying to install setuptools for python 2.7. I went into python 3.2 and tried to import zlib and got an error message when I tried that. I also tried to do sudo apt-get install zlib and got the error message E: Unable to locate package zlib. I did not get error messages when I tried sudo apt-get install zlib1g or sudo apt-get install zlib1g-dev` I really have no idea what's going on. How do I get zlib for python 3.2 (or otherwise fix this problem?)










share|improve this question






























    4















    I am trying to install python 3.2, and to get setuptools and pip in python 3.2. Everything seems to work right in python 2.7. However when I try to install setuptools using this code wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3.2 I get the following error



    Extracting in /tmp/tmpcwnav_
    Traceback (most recent call last):
    File "<stdin>", line 332, in <module>
    File "<stdin>", line 329, in main
    File "<stdin>", line 51, in _install
    File "/usr/local/lib/python3.2/contextlib.py", line 28, in __enter__
    return next(self.gen)
    File "<stdin>", line 101, in archive_context
    File "/usr/local/lib/python3.2/zipfile.py", line 1004, in extractall
    self.extract(zipinfo, path, pwd)
    File "/usr/local/lib/python3.2/zipfile.py", line 992, in extract
    return self._extract_member(member, path, pwd)
    File "/usr/local/lib/python3.2/zipfile.py", line 1035, in _extract_member
    source = self.open(member, pwd=pwd)
    File "/usr/local/lib/python3.2/zipfile.py", line 978, in open
    close_fileobj=not self._filePassed)
    File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__
    self._decompressor = zlib.decompressobj(-15)
    AttributeError: 'NoneType' object has no attribute 'decompressobj'


    Based on some googling, it looks like I am getting the problem because zlib has not been installed. I do not have this problem when trying to install setuptools for python 2.7. I went into python 3.2 and tried to import zlib and got an error message when I tried that. I also tried to do sudo apt-get install zlib and got the error message E: Unable to locate package zlib. I did not get error messages when I tried sudo apt-get install zlib1g or sudo apt-get install zlib1g-dev` I really have no idea what's going on. How do I get zlib for python 3.2 (or otherwise fix this problem?)










    share|improve this question


























      4












      4








      4








      I am trying to install python 3.2, and to get setuptools and pip in python 3.2. Everything seems to work right in python 2.7. However when I try to install setuptools using this code wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3.2 I get the following error



      Extracting in /tmp/tmpcwnav_
      Traceback (most recent call last):
      File "<stdin>", line 332, in <module>
      File "<stdin>", line 329, in main
      File "<stdin>", line 51, in _install
      File "/usr/local/lib/python3.2/contextlib.py", line 28, in __enter__
      return next(self.gen)
      File "<stdin>", line 101, in archive_context
      File "/usr/local/lib/python3.2/zipfile.py", line 1004, in extractall
      self.extract(zipinfo, path, pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 992, in extract
      return self._extract_member(member, path, pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 1035, in _extract_member
      source = self.open(member, pwd=pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 978, in open
      close_fileobj=not self._filePassed)
      File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__
      self._decompressor = zlib.decompressobj(-15)
      AttributeError: 'NoneType' object has no attribute 'decompressobj'


      Based on some googling, it looks like I am getting the problem because zlib has not been installed. I do not have this problem when trying to install setuptools for python 2.7. I went into python 3.2 and tried to import zlib and got an error message when I tried that. I also tried to do sudo apt-get install zlib and got the error message E: Unable to locate package zlib. I did not get error messages when I tried sudo apt-get install zlib1g or sudo apt-get install zlib1g-dev` I really have no idea what's going on. How do I get zlib for python 3.2 (or otherwise fix this problem?)










      share|improve this question
















      I am trying to install python 3.2, and to get setuptools and pip in python 3.2. Everything seems to work right in python 2.7. However when I try to install setuptools using this code wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python3.2 I get the following error



      Extracting in /tmp/tmpcwnav_
      Traceback (most recent call last):
      File "<stdin>", line 332, in <module>
      File "<stdin>", line 329, in main
      File "<stdin>", line 51, in _install
      File "/usr/local/lib/python3.2/contextlib.py", line 28, in __enter__
      return next(self.gen)
      File "<stdin>", line 101, in archive_context
      File "/usr/local/lib/python3.2/zipfile.py", line 1004, in extractall
      self.extract(zipinfo, path, pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 992, in extract
      return self._extract_member(member, path, pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 1035, in _extract_member
      source = self.open(member, pwd=pwd)
      File "/usr/local/lib/python3.2/zipfile.py", line 978, in open
      close_fileobj=not self._filePassed)
      File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__
      self._decompressor = zlib.decompressobj(-15)
      AttributeError: 'NoneType' object has no attribute 'decompressobj'


      Based on some googling, it looks like I am getting the problem because zlib has not been installed. I do not have this problem when trying to install setuptools for python 2.7. I went into python 3.2 and tried to import zlib and got an error message when I tried that. I also tried to do sudo apt-get install zlib and got the error message E: Unable to locate package zlib. I did not get error messages when I tried sudo apt-get install zlib1g or sudo apt-get install zlib1g-dev` I really have no idea what's going on. How do I get zlib for python 3.2 (or otherwise fix this problem?)







      python






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 17 hours ago









      Rui F Ribeiro

      42.1k1483142




      42.1k1483142










      asked Oct 27 '14 at 20:57









      Ravi Ravi

      12313




      12313




















          2 Answers
          2






          active

          oldest

          votes


















          5














          Your problem seems to be you compiled Python without support for zlib. Make sure you have zlib-devel installed (sudo apt-get install zlib1g-dev) before compiling Python.
          There's nothing wrong with using Python compiled by you in addition or instead of the system one. However you have to remember to be explicit when invoking Python and invoke the one you intend to use by specifying full path like /usr/local/bin/python instead of plain python. Alternatively you can add (/usr/local/bin/) to your PATH before /usr/bin/ so that when you type python system runs your compiled Python.






          share|improve this answer






























            0














            Your problem is here:



            File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__


            you aren't using your system python binary. Make sure you are using your system binaries with:



            wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo /usr/bin/python3


            It should work.






            share|improve this answer























            • Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

              – Ravi
              Oct 27 '14 at 22:16











            • @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

              – Braiam
              Oct 27 '14 at 22:17











            • I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

              – Ravi
              Oct 27 '14 at 22:34











            • Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

              – Ravi
              Oct 27 '14 at 22:38











            • @Ravi use the complete path as I'm doing in the post.

              – Braiam
              Oct 27 '14 at 22:50











            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%2f164517%2fnonetype-object-has-no-attribute-decompressobj-while-installing-bootstrap-se%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














            Your problem seems to be you compiled Python without support for zlib. Make sure you have zlib-devel installed (sudo apt-get install zlib1g-dev) before compiling Python.
            There's nothing wrong with using Python compiled by you in addition or instead of the system one. However you have to remember to be explicit when invoking Python and invoke the one you intend to use by specifying full path like /usr/local/bin/python instead of plain python. Alternatively you can add (/usr/local/bin/) to your PATH before /usr/bin/ so that when you type python system runs your compiled Python.






            share|improve this answer



























              5














              Your problem seems to be you compiled Python without support for zlib. Make sure you have zlib-devel installed (sudo apt-get install zlib1g-dev) before compiling Python.
              There's nothing wrong with using Python compiled by you in addition or instead of the system one. However you have to remember to be explicit when invoking Python and invoke the one you intend to use by specifying full path like /usr/local/bin/python instead of plain python. Alternatively you can add (/usr/local/bin/) to your PATH before /usr/bin/ so that when you type python system runs your compiled Python.






              share|improve this answer

























                5












                5








                5







                Your problem seems to be you compiled Python without support for zlib. Make sure you have zlib-devel installed (sudo apt-get install zlib1g-dev) before compiling Python.
                There's nothing wrong with using Python compiled by you in addition or instead of the system one. However you have to remember to be explicit when invoking Python and invoke the one you intend to use by specifying full path like /usr/local/bin/python instead of plain python. Alternatively you can add (/usr/local/bin/) to your PATH before /usr/bin/ so that when you type python system runs your compiled Python.






                share|improve this answer













                Your problem seems to be you compiled Python without support for zlib. Make sure you have zlib-devel installed (sudo apt-get install zlib1g-dev) before compiling Python.
                There's nothing wrong with using Python compiled by you in addition or instead of the system one. However you have to remember to be explicit when invoking Python and invoke the one you intend to use by specifying full path like /usr/local/bin/python instead of plain python. Alternatively you can add (/usr/local/bin/) to your PATH before /usr/bin/ so that when you type python system runs your compiled Python.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 28 '14 at 8:54









                Piotr DobrogostPiotr Dobrogost

                1,10221533




                1,10221533























                    0














                    Your problem is here:



                    File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__


                    you aren't using your system python binary. Make sure you are using your system binaries with:



                    wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo /usr/bin/python3


                    It should work.






                    share|improve this answer























                    • Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                      – Ravi
                      Oct 27 '14 at 22:16











                    • @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                      – Braiam
                      Oct 27 '14 at 22:17











                    • I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                      – Ravi
                      Oct 27 '14 at 22:34











                    • Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                      – Ravi
                      Oct 27 '14 at 22:38











                    • @Ravi use the complete path as I'm doing in the post.

                      – Braiam
                      Oct 27 '14 at 22:50















                    0














                    Your problem is here:



                    File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__


                    you aren't using your system python binary. Make sure you are using your system binaries with:



                    wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo /usr/bin/python3


                    It should work.






                    share|improve this answer























                    • Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                      – Ravi
                      Oct 27 '14 at 22:16











                    • @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                      – Braiam
                      Oct 27 '14 at 22:17











                    • I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                      – Ravi
                      Oct 27 '14 at 22:34











                    • Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                      – Ravi
                      Oct 27 '14 at 22:38











                    • @Ravi use the complete path as I'm doing in the post.

                      – Braiam
                      Oct 27 '14 at 22:50













                    0












                    0








                    0







                    Your problem is here:



                    File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__


                    you aren't using your system python binary. Make sure you are using your system binaries with:



                    wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo /usr/bin/python3


                    It should work.






                    share|improve this answer













                    Your problem is here:



                    File "/usr/local/lib/python3.2/zipfile.py", line 487, in __init__


                    you aren't using your system python binary. Make sure you are using your system binaries with:



                    wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo /usr/bin/python3


                    It should work.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 27 '14 at 22:13









                    BraiamBraiam

                    23.8k2078143




                    23.8k2078143












                    • Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                      – Ravi
                      Oct 27 '14 at 22:16











                    • @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                      – Braiam
                      Oct 27 '14 at 22:17











                    • I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                      – Ravi
                      Oct 27 '14 at 22:34











                    • Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                      – Ravi
                      Oct 27 '14 at 22:38











                    • @Ravi use the complete path as I'm doing in the post.

                      – Braiam
                      Oct 27 '14 at 22:50

















                    • Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                      – Ravi
                      Oct 27 '14 at 22:16











                    • @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                      – Braiam
                      Oct 27 '14 at 22:17











                    • I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                      – Ravi
                      Oct 27 '14 at 22:34











                    • Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                      – Ravi
                      Oct 27 '14 at 22:38











                    • @Ravi use the complete path as I'm doing in the post.

                      – Braiam
                      Oct 27 '14 at 22:50
















                    Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                    – Ravi
                    Oct 27 '14 at 22:16





                    Thanks! Do I have to somehow uninstall the old version first, or can I just cut and paste the command in>

                    – Ravi
                    Oct 27 '14 at 22:16













                    @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                    – Braiam
                    Oct 27 '14 at 22:17





                    @Ravi is recommendable that you remove that version of your system, to prevent problems in the future.

                    – Braiam
                    Oct 27 '14 at 22:17













                    I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                    – Ravi
                    Oct 27 '14 at 22:34





                    I installed it from the source, and it looks like there is no easy way to uninstall it. In the short run, is there any easy way for me to make sure that the right version of Python is being used?

                    – Ravi
                    Oct 27 '14 at 22:34













                    Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                    – Ravi
                    Oct 27 '14 at 22:38





                    Or alternatively, is there any way for me to tell the computer to use the system binaries without reinstalling python 3.2?

                    – Ravi
                    Oct 27 '14 at 22:38













                    @Ravi use the complete path as I'm doing in the post.

                    – Braiam
                    Oct 27 '14 at 22:50





                    @Ravi use the complete path as I'm doing in the post.

                    – Braiam
                    Oct 27 '14 at 22:50

















                    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%2f164517%2fnonetype-object-has-no-attribute-decompressobj-while-installing-bootstrap-se%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







                    -python

                    Popular posts from this blog

                    Frič See also Navigation menuinternal link

                    Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant

                    fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown “element blank” The 2019 Stack Overflow Developer Survey Results Are In“tar: unrecognized option --warning” during 'apt-get install'How to fix Fontconfig errorHow do I figure out which font file is chosen for a system generic font alias?Why are some apt-get-installed fonts being ignored by fc-list, xfontsel, etc?Reload settings in /etc/fonts/conf.dTaking 30 seconds longer to boot after upgrade from jessie to stretchHow to match multiple font names with a single <match> element?Adding a custom font to fontconfigRemoving fonts from fontconfig <match> resultsBroken fonts after upgrading Firefox ESR to latest Firefox