Minted cannot find pygmentize in TexStudio on Windows 7












2














I want to use minted package, but when I'm xelatexing in TexStudio, there's an error:



minted: You must have `pygmentize' installed to use this package.


pip seems unable to find pygmentize:



enter image description here



In my C:Python26Scripts there are files named pygmentize:



enter image description here



I have followed instructions from here https://tex.stackexchange.com/questions/108661/how-to-use-minted-under-miktex-and-windows-7 where it is suggested to install Pygments which is what I did:



enter image description here



This is my PATH:



C:UsersMilosAppDataRoamingnpm;C:Python26;C:Python26Scripts


However it is not working. How should I fix this?










share|improve this question















migrated from tex.stackexchange.com Sep 24 '14 at 21:01


This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.















  • I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
    – Joseph Wright
    Sep 24 '14 at 20:49










  • I will check my Win7 rig about this, but can't until tomorrow.
    – Joseph Wright
    Sep 24 '14 at 20:51










  • I would appreciate that. :) Well, if not here, where could I post the question then? :)
    – Milos
    Sep 24 '14 at 20:53










  • I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
    – Joseph Wright
    Sep 24 '14 at 20:54






  • 1




    Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
    – darthbith
    Sep 24 '14 at 21:26
















2














I want to use minted package, but when I'm xelatexing in TexStudio, there's an error:



minted: You must have `pygmentize' installed to use this package.


pip seems unable to find pygmentize:



enter image description here



In my C:Python26Scripts there are files named pygmentize:



enter image description here



I have followed instructions from here https://tex.stackexchange.com/questions/108661/how-to-use-minted-under-miktex-and-windows-7 where it is suggested to install Pygments which is what I did:



enter image description here



This is my PATH:



C:UsersMilosAppDataRoamingnpm;C:Python26;C:Python26Scripts


However it is not working. How should I fix this?










share|improve this question















migrated from tex.stackexchange.com Sep 24 '14 at 21:01


This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.















  • I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
    – Joseph Wright
    Sep 24 '14 at 20:49










  • I will check my Win7 rig about this, but can't until tomorrow.
    – Joseph Wright
    Sep 24 '14 at 20:51










  • I would appreciate that. :) Well, if not here, where could I post the question then? :)
    – Milos
    Sep 24 '14 at 20:53










  • I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
    – Joseph Wright
    Sep 24 '14 at 20:54






  • 1




    Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
    – darthbith
    Sep 24 '14 at 21:26














2












2








2


1





I want to use minted package, but when I'm xelatexing in TexStudio, there's an error:



minted: You must have `pygmentize' installed to use this package.


pip seems unable to find pygmentize:



enter image description here



In my C:Python26Scripts there are files named pygmentize:



enter image description here



I have followed instructions from here https://tex.stackexchange.com/questions/108661/how-to-use-minted-under-miktex-and-windows-7 where it is suggested to install Pygments which is what I did:



enter image description here



This is my PATH:



C:UsersMilosAppDataRoamingnpm;C:Python26;C:Python26Scripts


However it is not working. How should I fix this?










share|improve this question















I want to use minted package, but when I'm xelatexing in TexStudio, there's an error:



minted: You must have `pygmentize' installed to use this package.


pip seems unable to find pygmentize:



enter image description here



In my C:Python26Scripts there are files named pygmentize:



enter image description here



I have followed instructions from here https://tex.stackexchange.com/questions/108661/how-to-use-minted-under-miktex-and-windows-7 where it is suggested to install Pygments which is what I did:



enter image description here



This is my PATH:



C:UsersMilosAppDataRoamingnpm;C:Python26;C:Python26Scripts


However it is not working. How should I fix this?







windows python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:34









Community

1




1










asked Sep 24 '14 at 20:46









MilosMilos

11113




11113




migrated from tex.stackexchange.com Sep 24 '14 at 21:01


This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.






migrated from tex.stackexchange.com Sep 24 '14 at 21:01


This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.














  • I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
    – Joseph Wright
    Sep 24 '14 at 20:49










  • I will check my Win7 rig about this, but can't until tomorrow.
    – Joseph Wright
    Sep 24 '14 at 20:51










  • I would appreciate that. :) Well, if not here, where could I post the question then? :)
    – Milos
    Sep 24 '14 at 20:53










  • I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
    – Joseph Wright
    Sep 24 '14 at 20:54






  • 1




    Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
    – darthbith
    Sep 24 '14 at 21:26


















  • I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
    – Joseph Wright
    Sep 24 '14 at 20:49










  • I will check my Win7 rig about this, but can't until tomorrow.
    – Joseph Wright
    Sep 24 '14 at 20:51










  • I would appreciate that. :) Well, if not here, where could I post the question then? :)
    – Milos
    Sep 24 '14 at 20:53










  • I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
    – Joseph Wright
    Sep 24 '14 at 20:54






  • 1




    Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
    – darthbith
    Sep 24 '14 at 21:26
















I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
– Joseph Wright
Sep 24 '14 at 20:49




I have a feeling this is probably off-topic: if the Python set up you have doesn't work in this regard then that's not really a TeX problem!
– Joseph Wright
Sep 24 '14 at 20:49












I will check my Win7 rig about this, but can't until tomorrow.
– Joseph Wright
Sep 24 '14 at 20:51




I will check my Win7 rig about this, but can't until tomorrow.
– Joseph Wright
Sep 24 '14 at 20:51












I would appreciate that. :) Well, if not here, where could I post the question then? :)
– Milos
Sep 24 '14 at 20:53




I would appreciate that. :) Well, if not here, where could I post the question then? :)
– Milos
Sep 24 '14 at 20:53












I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
– Joseph Wright
Sep 24 '14 at 20:54




I guess SuperUser might be the best place: probably if we migrate you'll want to edit it down to drop the TeX angle (which isn't really crucial here).
– Joseph Wright
Sep 24 '14 at 20:54




1




1




Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
– darthbith
Sep 24 '14 at 21:26




Did you try closing/reopening TeXStudio? Can you compile from the command line (xelatex filename)?
– darthbith
Sep 24 '14 at 21:26










2 Answers
2






active

oldest

votes


















1
















  • You need only to install Pygments into Python, Pygmentize is a command available once Pygments have been installed.



    You can check it has been properly installed on Windows and can be accessed in the PATH by typing in a command line:




    pygmentize -h




    Which will print the help message.




  • Don't forget to use the -shell-escape option in order to allow your tex compiler to access the external commands.



    See how to do it here




  • Make sure you have all your MiKTeX packages up to date.
    In my case, my antivirus software was preventing some MiKTeX packages updates, which in turn where making minted unusable.



    I fount this solution here



  • As @darthbith suggested in the comments, closing and reopening (or a system restart) can be needed for the PATH to be reloaded.






share|improve this answer































    0














    I had the exact same problem, but on Windows 10. I will now write a proper answer for future users.



    There are 3 things that must be done in order to use the minted package in TeX:




    1. Change your pdflatex output to include -shell-escape,


    2. Make sure pygmentize is installed in your python shell, and most difficultly


    3. Make sure TeX prioritizes the correct PATH.



    Solutions:




    1. Go to Options in your preferred TeX editor and change the PdfLaTeX
      to: whatever it was before and then "-shell-escape %.tex"

    2. Go to your Python Shell, fx Anaconda Prompt if you're using Anaconda
      as your Python editor. Check if pygmentize is already installed by
      writing: "pygmentize -v". If it brings up your current version,
      continue to solution 3. If not, type: "pip install Pygment". This
      should install pygmentize in whatever folder your Python editor uses
      for scripts, which is needed for the next solution.


    3. First, use Windows search to find "pygmentize.exe". Copy the path
      from the address bar, fx
      "C:UsersYourUsernameHereAnaconda3Scripts".



      Now use Windows search to find "Advanced System Settings". Clicking
      on the result should bring you exactly to the "Advanced" tab of the
      System Settings, if not, go there. There will be a button for
      "Environment Variables...", click on it.



      Under the "User variables for YourUsernameHere", click on the
      variable "Path" and then click "Edit...". Create a new path for the
      copied path from earlier, fx
      "C:UsersYourUsernameHereAnaconda3Scripts", and then click "Move
      up" until it is above any TeX related paths.



      Restart your computer. Minted should now work :)




    Hope this helps someone in the future save precious time that I wasted myself. Net gain!






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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%2fsuperuser.com%2fquestions%2f816340%2fminted-cannot-find-pygmentize-in-texstudio-on-windows-7%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









      1
















      • You need only to install Pygments into Python, Pygmentize is a command available once Pygments have been installed.



        You can check it has been properly installed on Windows and can be accessed in the PATH by typing in a command line:




        pygmentize -h




        Which will print the help message.




      • Don't forget to use the -shell-escape option in order to allow your tex compiler to access the external commands.



        See how to do it here




      • Make sure you have all your MiKTeX packages up to date.
        In my case, my antivirus software was preventing some MiKTeX packages updates, which in turn where making minted unusable.



        I fount this solution here



      • As @darthbith suggested in the comments, closing and reopening (or a system restart) can be needed for the PATH to be reloaded.






      share|improve this answer




























        1
















        • You need only to install Pygments into Python, Pygmentize is a command available once Pygments have been installed.



          You can check it has been properly installed on Windows and can be accessed in the PATH by typing in a command line:




          pygmentize -h




          Which will print the help message.




        • Don't forget to use the -shell-escape option in order to allow your tex compiler to access the external commands.



          See how to do it here




        • Make sure you have all your MiKTeX packages up to date.
          In my case, my antivirus software was preventing some MiKTeX packages updates, which in turn where making minted unusable.



          I fount this solution here



        • As @darthbith suggested in the comments, closing and reopening (or a system restart) can be needed for the PATH to be reloaded.






        share|improve this answer


























          1












          1








          1








          • You need only to install Pygments into Python, Pygmentize is a command available once Pygments have been installed.



            You can check it has been properly installed on Windows and can be accessed in the PATH by typing in a command line:




            pygmentize -h




            Which will print the help message.




          • Don't forget to use the -shell-escape option in order to allow your tex compiler to access the external commands.



            See how to do it here




          • Make sure you have all your MiKTeX packages up to date.
            In my case, my antivirus software was preventing some MiKTeX packages updates, which in turn where making minted unusable.



            I fount this solution here



          • As @darthbith suggested in the comments, closing and reopening (or a system restart) can be needed for the PATH to be reloaded.






          share|improve this answer
















          • You need only to install Pygments into Python, Pygmentize is a command available once Pygments have been installed.



            You can check it has been properly installed on Windows and can be accessed in the PATH by typing in a command line:




            pygmentize -h




            Which will print the help message.




          • Don't forget to use the -shell-escape option in order to allow your tex compiler to access the external commands.



            See how to do it here




          • Make sure you have all your MiKTeX packages up to date.
            In my case, my antivirus software was preventing some MiKTeX packages updates, which in turn where making minted unusable.



            I fount this solution here



          • As @darthbith suggested in the comments, closing and reopening (or a system restart) can be needed for the PATH to be reloaded.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:34









          Community

          1




          1










          answered Aug 13 '16 at 12:09









          ToghTogh

          48135




          48135

























              0














              I had the exact same problem, but on Windows 10. I will now write a proper answer for future users.



              There are 3 things that must be done in order to use the minted package in TeX:




              1. Change your pdflatex output to include -shell-escape,


              2. Make sure pygmentize is installed in your python shell, and most difficultly


              3. Make sure TeX prioritizes the correct PATH.



              Solutions:




              1. Go to Options in your preferred TeX editor and change the PdfLaTeX
                to: whatever it was before and then "-shell-escape %.tex"

              2. Go to your Python Shell, fx Anaconda Prompt if you're using Anaconda
                as your Python editor. Check if pygmentize is already installed by
                writing: "pygmentize -v". If it brings up your current version,
                continue to solution 3. If not, type: "pip install Pygment". This
                should install pygmentize in whatever folder your Python editor uses
                for scripts, which is needed for the next solution.


              3. First, use Windows search to find "pygmentize.exe". Copy the path
                from the address bar, fx
                "C:UsersYourUsernameHereAnaconda3Scripts".



                Now use Windows search to find "Advanced System Settings". Clicking
                on the result should bring you exactly to the "Advanced" tab of the
                System Settings, if not, go there. There will be a button for
                "Environment Variables...", click on it.



                Under the "User variables for YourUsernameHere", click on the
                variable "Path" and then click "Edit...". Create a new path for the
                copied path from earlier, fx
                "C:UsersYourUsernameHereAnaconda3Scripts", and then click "Move
                up" until it is above any TeX related paths.



                Restart your computer. Minted should now work :)




              Hope this helps someone in the future save precious time that I wasted myself. Net gain!






              share|improve this answer


























                0














                I had the exact same problem, but on Windows 10. I will now write a proper answer for future users.



                There are 3 things that must be done in order to use the minted package in TeX:




                1. Change your pdflatex output to include -shell-escape,


                2. Make sure pygmentize is installed in your python shell, and most difficultly


                3. Make sure TeX prioritizes the correct PATH.



                Solutions:




                1. Go to Options in your preferred TeX editor and change the PdfLaTeX
                  to: whatever it was before and then "-shell-escape %.tex"

                2. Go to your Python Shell, fx Anaconda Prompt if you're using Anaconda
                  as your Python editor. Check if pygmentize is already installed by
                  writing: "pygmentize -v". If it brings up your current version,
                  continue to solution 3. If not, type: "pip install Pygment". This
                  should install pygmentize in whatever folder your Python editor uses
                  for scripts, which is needed for the next solution.


                3. First, use Windows search to find "pygmentize.exe". Copy the path
                  from the address bar, fx
                  "C:UsersYourUsernameHereAnaconda3Scripts".



                  Now use Windows search to find "Advanced System Settings". Clicking
                  on the result should bring you exactly to the "Advanced" tab of the
                  System Settings, if not, go there. There will be a button for
                  "Environment Variables...", click on it.



                  Under the "User variables for YourUsernameHere", click on the
                  variable "Path" and then click "Edit...". Create a new path for the
                  copied path from earlier, fx
                  "C:UsersYourUsernameHereAnaconda3Scripts", and then click "Move
                  up" until it is above any TeX related paths.



                  Restart your computer. Minted should now work :)




                Hope this helps someone in the future save precious time that I wasted myself. Net gain!






                share|improve this answer
























                  0












                  0








                  0






                  I had the exact same problem, but on Windows 10. I will now write a proper answer for future users.



                  There are 3 things that must be done in order to use the minted package in TeX:




                  1. Change your pdflatex output to include -shell-escape,


                  2. Make sure pygmentize is installed in your python shell, and most difficultly


                  3. Make sure TeX prioritizes the correct PATH.



                  Solutions:




                  1. Go to Options in your preferred TeX editor and change the PdfLaTeX
                    to: whatever it was before and then "-shell-escape %.tex"

                  2. Go to your Python Shell, fx Anaconda Prompt if you're using Anaconda
                    as your Python editor. Check if pygmentize is already installed by
                    writing: "pygmentize -v". If it brings up your current version,
                    continue to solution 3. If not, type: "pip install Pygment". This
                    should install pygmentize in whatever folder your Python editor uses
                    for scripts, which is needed for the next solution.


                  3. First, use Windows search to find "pygmentize.exe". Copy the path
                    from the address bar, fx
                    "C:UsersYourUsernameHereAnaconda3Scripts".



                    Now use Windows search to find "Advanced System Settings". Clicking
                    on the result should bring you exactly to the "Advanced" tab of the
                    System Settings, if not, go there. There will be a button for
                    "Environment Variables...", click on it.



                    Under the "User variables for YourUsernameHere", click on the
                    variable "Path" and then click "Edit...". Create a new path for the
                    copied path from earlier, fx
                    "C:UsersYourUsernameHereAnaconda3Scripts", and then click "Move
                    up" until it is above any TeX related paths.



                    Restart your computer. Minted should now work :)




                  Hope this helps someone in the future save precious time that I wasted myself. Net gain!






                  share|improve this answer












                  I had the exact same problem, but on Windows 10. I will now write a proper answer for future users.



                  There are 3 things that must be done in order to use the minted package in TeX:




                  1. Change your pdflatex output to include -shell-escape,


                  2. Make sure pygmentize is installed in your python shell, and most difficultly


                  3. Make sure TeX prioritizes the correct PATH.



                  Solutions:




                  1. Go to Options in your preferred TeX editor and change the PdfLaTeX
                    to: whatever it was before and then "-shell-escape %.tex"

                  2. Go to your Python Shell, fx Anaconda Prompt if you're using Anaconda
                    as your Python editor. Check if pygmentize is already installed by
                    writing: "pygmentize -v". If it brings up your current version,
                    continue to solution 3. If not, type: "pip install Pygment". This
                    should install pygmentize in whatever folder your Python editor uses
                    for scripts, which is needed for the next solution.


                  3. First, use Windows search to find "pygmentize.exe". Copy the path
                    from the address bar, fx
                    "C:UsersYourUsernameHereAnaconda3Scripts".



                    Now use Windows search to find "Advanced System Settings". Clicking
                    on the result should bring you exactly to the "Advanced" tab of the
                    System Settings, if not, go there. There will be a button for
                    "Environment Variables...", click on it.



                    Under the "User variables for YourUsernameHere", click on the
                    variable "Path" and then click "Edit...". Create a new path for the
                    copied path from earlier, fx
                    "C:UsersYourUsernameHereAnaconda3Scripts", and then click "Move
                    up" until it is above any TeX related paths.



                    Restart your computer. Minted should now work :)




                  Hope this helps someone in the future save precious time that I wasted myself. Net gain!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 12 '18 at 4:43









                  HectorHector

                  11




                  11






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • 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%2fsuperuser.com%2fquestions%2f816340%2fminted-cannot-find-pygmentize-in-texstudio-on-windows-7%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

                      Сан-Квентин

                      8-я гвардейская общевойсковая армия

                      Алькесар