pip fails to install PIL or Pillow with mt.exe error











up vote
2
down vote

favorite
5












On one of my Windows 7 development machines, I am attempting to install the Python Image Library.



My machines are similar. Both run Windows 7 Professional, x64. Both use Python 2.7.3 (32bit). On one of the machine pip install PIL works fine. On the other it fails with the trace ending with this:



buildtemp.win-amd64-2.7Release_imaging.pyd.manifest : general error c1010070:
Failed to load and parse the manifest. The system cannot find the file specified.

error: command 'mt.exe' failed with exit status 31


How can I resolve this error?










share|improve this question


























    up vote
    2
    down vote

    favorite
    5












    On one of my Windows 7 development machines, I am attempting to install the Python Image Library.



    My machines are similar. Both run Windows 7 Professional, x64. Both use Python 2.7.3 (32bit). On one of the machine pip install PIL works fine. On the other it fails with the trace ending with this:



    buildtemp.win-amd64-2.7Release_imaging.pyd.manifest : general error c1010070:
    Failed to load and parse the manifest. The system cannot find the file specified.

    error: command 'mt.exe' failed with exit status 31


    How can I resolve this error?










    share|improve this question
























      up vote
      2
      down vote

      favorite
      5









      up vote
      2
      down vote

      favorite
      5






      5





      On one of my Windows 7 development machines, I am attempting to install the Python Image Library.



      My machines are similar. Both run Windows 7 Professional, x64. Both use Python 2.7.3 (32bit). On one of the machine pip install PIL works fine. On the other it fails with the trace ending with this:



      buildtemp.win-amd64-2.7Release_imaging.pyd.manifest : general error c1010070:
      Failed to load and parse the manifest. The system cannot find the file specified.

      error: command 'mt.exe' failed with exit status 31


      How can I resolve this error?










      share|improve this question













      On one of my Windows 7 development machines, I am attempting to install the Python Image Library.



      My machines are similar. Both run Windows 7 Professional, x64. Both use Python 2.7.3 (32bit). On one of the machine pip install PIL works fine. On the other it fails with the trace ending with this:



      buildtemp.win-amd64-2.7Release_imaging.pyd.manifest : general error c1010070:
      Failed to load and parse the manifest. The system cannot find the file specified.

      error: command 'mt.exe' failed with exit status 31


      How can I resolve this error?







      python windows-7 python-imaging-library pip






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 14 '12 at 5:41









      Andy

      30.2k21102158




      30.2k21102158
























          3 Answers
          3






          active

          oldest

          votes

















          up vote
          30
          down vote



          accepted










          Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:



          C:<Python dir>Libdistutilsmsvc9compiler.py


          and adding:



           ld_args.append('/MANIFEST')


          after the MANIFESTFILE line so it looks like:



                  # Embedded manifests are recommended - see MSDN article titled
          # "How to: Embed a Manifest Inside a C/C++ Application"
          # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
          # Ask the linker to generate the manifest in the temp dir, so
          # we can embed it later.
          temp_manifest = os.path.join(
          build_temp,
          os.path.basename(output_filename) + ".manifest")
          ld_args.append('/MANIFESTFILE:' + temp_manifest)
          ld_args.append('/MANIFEST')


          If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.






          share|improve this answer



















          • 4




            This must be the accepted answer.
            – Denis V
            Feb 24 '15 at 13:59










          • worked like a charm. thanks a lot.
            – Kawsar Ahmed
            Aug 26 '17 at 17:32


















          up vote
          1
          down vote













          Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.






          share|improve this answer






























            up vote
            1
            down vote













            If you've reached here looking for



            general error c1010070:
            Failed to load and parse the manifest. The system cannot find the file specified.

            error: command 'mt.exe' failed with exit status 31


            Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:



            # py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
            $env:VS100COMNTOOLS=$env:VS110COMNTOOLS

            # Modify C:Python33libdistutilsmsvc9compiler.py
            # Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
            # Basically it will instruct build to not look for manifest file





            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',
              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%2f12418735%2fpip-fails-to-install-pil-or-pillow-with-mt-exe-error%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              30
              down vote



              accepted










              Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:



              C:<Python dir>Libdistutilsmsvc9compiler.py


              and adding:



               ld_args.append('/MANIFEST')


              after the MANIFESTFILE line so it looks like:



                      # Embedded manifests are recommended - see MSDN article titled
              # "How to: Embed a Manifest Inside a C/C++ Application"
              # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
              # Ask the linker to generate the manifest in the temp dir, so
              # we can embed it later.
              temp_manifest = os.path.join(
              build_temp,
              os.path.basename(output_filename) + ".manifest")
              ld_args.append('/MANIFESTFILE:' + temp_manifest)
              ld_args.append('/MANIFEST')


              If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.






              share|improve this answer



















              • 4




                This must be the accepted answer.
                – Denis V
                Feb 24 '15 at 13:59










              • worked like a charm. thanks a lot.
                – Kawsar Ahmed
                Aug 26 '17 at 17:32















              up vote
              30
              down vote



              accepted










              Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:



              C:<Python dir>Libdistutilsmsvc9compiler.py


              and adding:



               ld_args.append('/MANIFEST')


              after the MANIFESTFILE line so it looks like:



                      # Embedded manifests are recommended - see MSDN article titled
              # "How to: Embed a Manifest Inside a C/C++ Application"
              # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
              # Ask the linker to generate the manifest in the temp dir, so
              # we can embed it later.
              temp_manifest = os.path.join(
              build_temp,
              os.path.basename(output_filename) + ".manifest")
              ld_args.append('/MANIFESTFILE:' + temp_manifest)
              ld_args.append('/MANIFEST')


              If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.






              share|improve this answer



















              • 4




                This must be the accepted answer.
                – Denis V
                Feb 24 '15 at 13:59










              • worked like a charm. thanks a lot.
                – Kawsar Ahmed
                Aug 26 '17 at 17:32













              up vote
              30
              down vote



              accepted







              up vote
              30
              down vote



              accepted






              Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:



              C:<Python dir>Libdistutilsmsvc9compiler.py


              and adding:



               ld_args.append('/MANIFEST')


              after the MANIFESTFILE line so it looks like:



                      # Embedded manifests are recommended - see MSDN article titled
              # "How to: Embed a Manifest Inside a C/C++ Application"
              # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
              # Ask the linker to generate the manifest in the temp dir, so
              # we can embed it later.
              temp_manifest = os.path.join(
              build_temp,
              os.path.basename(output_filename) + ".manifest")
              ld_args.append('/MANIFESTFILE:' + temp_manifest)
              ld_args.append('/MANIFEST')


              If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.






              share|improve this answer














              Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:



              C:<Python dir>Libdistutilsmsvc9compiler.py


              and adding:



               ld_args.append('/MANIFEST')


              after the MANIFESTFILE line so it looks like:



                      # Embedded manifests are recommended - see MSDN article titled
              # "How to: Embed a Manifest Inside a C/C++ Application"
              # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
              # Ask the linker to generate the manifest in the temp dir, so
              # we can embed it later.
              temp_manifest = os.path.join(
              build_temp,
              os.path.basename(output_filename) + ".manifest")
              ld_args.append('/MANIFESTFILE:' + temp_manifest)
              ld_args.append('/MANIFEST')


              If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 21 at 19:48









              Dilman Salih

              417




              417










              answered Nov 18 '13 at 14:28









              frmdstryr

              4,60622225




              4,60622225








              • 4




                This must be the accepted answer.
                – Denis V
                Feb 24 '15 at 13:59










              • worked like a charm. thanks a lot.
                – Kawsar Ahmed
                Aug 26 '17 at 17:32














              • 4




                This must be the accepted answer.
                – Denis V
                Feb 24 '15 at 13:59










              • worked like a charm. thanks a lot.
                – Kawsar Ahmed
                Aug 26 '17 at 17:32








              4




              4




              This must be the accepted answer.
              – Denis V
              Feb 24 '15 at 13:59




              This must be the accepted answer.
              – Denis V
              Feb 24 '15 at 13:59












              worked like a charm. thanks a lot.
              – Kawsar Ahmed
              Aug 26 '17 at 17:32




              worked like a charm. thanks a lot.
              – Kawsar Ahmed
              Aug 26 '17 at 17:32












              up vote
              1
              down vote













              Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.






              share|improve this answer



























                up vote
                1
                down vote













                Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.






                share|improve this answer

























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.






                  share|improve this answer














                  Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 14 '12 at 6:20

























                  answered Sep 14 '12 at 6:14









                  Babu

                  1,5911738




                  1,5911738






















                      up vote
                      1
                      down vote













                      If you've reached here looking for



                      general error c1010070:
                      Failed to load and parse the manifest. The system cannot find the file specified.

                      error: command 'mt.exe' failed with exit status 31


                      Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:



                      # py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
                      $env:VS100COMNTOOLS=$env:VS110COMNTOOLS

                      # Modify C:Python33libdistutilsmsvc9compiler.py
                      # Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
                      # Basically it will instruct build to not look for manifest file





                      share|improve this answer

























                        up vote
                        1
                        down vote













                        If you've reached here looking for



                        general error c1010070:
                        Failed to load and parse the manifest. The system cannot find the file specified.

                        error: command 'mt.exe' failed with exit status 31


                        Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:



                        # py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
                        $env:VS100COMNTOOLS=$env:VS110COMNTOOLS

                        # Modify C:Python33libdistutilsmsvc9compiler.py
                        # Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
                        # Basically it will instruct build to not look for manifest file





                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          If you've reached here looking for



                          general error c1010070:
                          Failed to load and parse the manifest. The system cannot find the file specified.

                          error: command 'mt.exe' failed with exit status 31


                          Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:



                          # py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
                          $env:VS100COMNTOOLS=$env:VS110COMNTOOLS

                          # Modify C:Python33libdistutilsmsvc9compiler.py
                          # Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
                          # Basically it will instruct build to not look for manifest file





                          share|improve this answer












                          If you've reached here looking for



                          general error c1010070:
                          Failed to load and parse the manifest. The system cannot find the file specified.

                          error: command 'mt.exe' failed with exit status 31


                          Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:



                          # py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
                          $env:VS100COMNTOOLS=$env:VS110COMNTOOLS

                          # Modify C:Python33libdistutilsmsvc9compiler.py
                          # Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
                          # Basically it will instruct build to not look for manifest file






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 9 '13 at 6:39









                          Arun M

                          1,334713




                          1,334713






























                              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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2f12418735%2fpip-fails-to-install-pil-or-pillow-with-mt-exe-error%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

                              Berounka

                              Sphinx de Gizeh

                              Different font size/position of beamer's navigation symbols template's content depending on regular/plain...