How to install gvim.exe on Windows with Python support?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















Problem description:



For all the executable installers for Vim that are listed below, the tags +python/dyn and +python3/dyn are unanimous when installed. However, for all my local installations using these installers, none worked. I don't have enough reputation to include more than two URLs. So, reference to the installers goes to the comment.




  1. The plain Vim version from Vim Cream.

  2. The "official", yet obsolete Vim installer.

  3. "Home built" Vim distributions released by kindhearted individuals.


What has caused the problem



There is a single line of command in my _vimrc:



  let $PYTHONHOME = 'C:/Program Files/Anacoda'


While, as I played with those Vim distributions + Python packages, I did not pay attention to this :( Now, deleting this funky line cures all my problems. Nevertheless, it is good to know there are numerous ways to properly install Vim onto Windows machine.



The specific error



When I try the command python import sys, it gives me the error message "E887: Sorry, this command is disabled, the Python's site module could not be loaded." This error message would also occur when I try to invoke VOom and Vim-Latex-Suite, two Vim-plugins.



My installation attempts:



I adhere to the following two guidelines/restrictions:





  • Restriction 1: The version of Python



    According to the following discussions, it is clear that Vim may only work with Python 2.7.9 on Windows. Also, we shall match the 32-bit Vim with a 32-bit Python.




    • Ref 1: https://stackoverflow.com/questions/32025090/vim-for-windows-python-doesnt-load-properly-crashes

    • Ref 2: https://vi.stackexchange.com/questions/6294/how-do-i-use-python-plugins-on-windows




  • Restriction 2: The order of installation



    The gvim.exe shall need to see the python27.dll and the python33.dll. (This is accessible through :version in Vim.) So, one needs to install the Python distributions first, and then install the Vim executables. Yet, it is unclear to me if two versions of Python may exist on one Windows machine in harmony. So, I have never had the python33.dll available on my machine. Yet, gvim.exe may only complain about python27.dll should it have been missing. So far, I have never installed a Python 3.3 and I have never seen the Gvim complaining about the missing python33.dll. This also confused me.




Nevertheless, I still cannot get Vim to work with "a proper Python distribution".



Help needed!



Inexperienced with program developing, I am really having a hard time debugging this issue. Any advice would help!



As of now, I am trying to set up a complete installation of Cygwin, in hope that it may build a local Vim distribution; also, I am also attempting to pursue another route: to compile the source file of Vim using Visual Studio. Simply completely installing these two softwares takes hours.



Hope someone may help!



All the best,



-Linfeng










share|improve this question

























  • In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

    – llinfeng
    Jul 5 '16 at 19:10













  • Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

    – matzeri
    Jul 5 '16 at 21:23











  • To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

    – llinfeng
    Jul 6 '16 at 2:46











  • @matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

    – llinfeng
    Jul 6 '16 at 2:48











  • Install a vim binary from here and don't forget to install the required python interpreter as well.

    – Christian Brabandt
    Jul 7 '16 at 7:38


















1















Problem description:



For all the executable installers for Vim that are listed below, the tags +python/dyn and +python3/dyn are unanimous when installed. However, for all my local installations using these installers, none worked. I don't have enough reputation to include more than two URLs. So, reference to the installers goes to the comment.




  1. The plain Vim version from Vim Cream.

  2. The "official", yet obsolete Vim installer.

  3. "Home built" Vim distributions released by kindhearted individuals.


What has caused the problem



There is a single line of command in my _vimrc:



  let $PYTHONHOME = 'C:/Program Files/Anacoda'


While, as I played with those Vim distributions + Python packages, I did not pay attention to this :( Now, deleting this funky line cures all my problems. Nevertheless, it is good to know there are numerous ways to properly install Vim onto Windows machine.



The specific error



When I try the command python import sys, it gives me the error message "E887: Sorry, this command is disabled, the Python's site module could not be loaded." This error message would also occur when I try to invoke VOom and Vim-Latex-Suite, two Vim-plugins.



My installation attempts:



I adhere to the following two guidelines/restrictions:





  • Restriction 1: The version of Python



    According to the following discussions, it is clear that Vim may only work with Python 2.7.9 on Windows. Also, we shall match the 32-bit Vim with a 32-bit Python.




    • Ref 1: https://stackoverflow.com/questions/32025090/vim-for-windows-python-doesnt-load-properly-crashes

    • Ref 2: https://vi.stackexchange.com/questions/6294/how-do-i-use-python-plugins-on-windows




  • Restriction 2: The order of installation



    The gvim.exe shall need to see the python27.dll and the python33.dll. (This is accessible through :version in Vim.) So, one needs to install the Python distributions first, and then install the Vim executables. Yet, it is unclear to me if two versions of Python may exist on one Windows machine in harmony. So, I have never had the python33.dll available on my machine. Yet, gvim.exe may only complain about python27.dll should it have been missing. So far, I have never installed a Python 3.3 and I have never seen the Gvim complaining about the missing python33.dll. This also confused me.




Nevertheless, I still cannot get Vim to work with "a proper Python distribution".



Help needed!



Inexperienced with program developing, I am really having a hard time debugging this issue. Any advice would help!



As of now, I am trying to set up a complete installation of Cygwin, in hope that it may build a local Vim distribution; also, I am also attempting to pursue another route: to compile the source file of Vim using Visual Studio. Simply completely installing these two softwares takes hours.



Hope someone may help!



All the best,



-Linfeng










share|improve this question

























  • In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

    – llinfeng
    Jul 5 '16 at 19:10













  • Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

    – matzeri
    Jul 5 '16 at 21:23











  • To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

    – llinfeng
    Jul 6 '16 at 2:46











  • @matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

    – llinfeng
    Jul 6 '16 at 2:48











  • Install a vim binary from here and don't forget to install the required python interpreter as well.

    – Christian Brabandt
    Jul 7 '16 at 7:38














1












1








1


2






Problem description:



For all the executable installers for Vim that are listed below, the tags +python/dyn and +python3/dyn are unanimous when installed. However, for all my local installations using these installers, none worked. I don't have enough reputation to include more than two URLs. So, reference to the installers goes to the comment.




  1. The plain Vim version from Vim Cream.

  2. The "official", yet obsolete Vim installer.

  3. "Home built" Vim distributions released by kindhearted individuals.


What has caused the problem



There is a single line of command in my _vimrc:



  let $PYTHONHOME = 'C:/Program Files/Anacoda'


While, as I played with those Vim distributions + Python packages, I did not pay attention to this :( Now, deleting this funky line cures all my problems. Nevertheless, it is good to know there are numerous ways to properly install Vim onto Windows machine.



The specific error



When I try the command python import sys, it gives me the error message "E887: Sorry, this command is disabled, the Python's site module could not be loaded." This error message would also occur when I try to invoke VOom and Vim-Latex-Suite, two Vim-plugins.



My installation attempts:



I adhere to the following two guidelines/restrictions:





  • Restriction 1: The version of Python



    According to the following discussions, it is clear that Vim may only work with Python 2.7.9 on Windows. Also, we shall match the 32-bit Vim with a 32-bit Python.




    • Ref 1: https://stackoverflow.com/questions/32025090/vim-for-windows-python-doesnt-load-properly-crashes

    • Ref 2: https://vi.stackexchange.com/questions/6294/how-do-i-use-python-plugins-on-windows




  • Restriction 2: The order of installation



    The gvim.exe shall need to see the python27.dll and the python33.dll. (This is accessible through :version in Vim.) So, one needs to install the Python distributions first, and then install the Vim executables. Yet, it is unclear to me if two versions of Python may exist on one Windows machine in harmony. So, I have never had the python33.dll available on my machine. Yet, gvim.exe may only complain about python27.dll should it have been missing. So far, I have never installed a Python 3.3 and I have never seen the Gvim complaining about the missing python33.dll. This also confused me.




Nevertheless, I still cannot get Vim to work with "a proper Python distribution".



Help needed!



Inexperienced with program developing, I am really having a hard time debugging this issue. Any advice would help!



As of now, I am trying to set up a complete installation of Cygwin, in hope that it may build a local Vim distribution; also, I am also attempting to pursue another route: to compile the source file of Vim using Visual Studio. Simply completely installing these two softwares takes hours.



Hope someone may help!



All the best,



-Linfeng










share|improve this question
















Problem description:



For all the executable installers for Vim that are listed below, the tags +python/dyn and +python3/dyn are unanimous when installed. However, for all my local installations using these installers, none worked. I don't have enough reputation to include more than two URLs. So, reference to the installers goes to the comment.




  1. The plain Vim version from Vim Cream.

  2. The "official", yet obsolete Vim installer.

  3. "Home built" Vim distributions released by kindhearted individuals.


What has caused the problem



There is a single line of command in my _vimrc:



  let $PYTHONHOME = 'C:/Program Files/Anacoda'


While, as I played with those Vim distributions + Python packages, I did not pay attention to this :( Now, deleting this funky line cures all my problems. Nevertheless, it is good to know there are numerous ways to properly install Vim onto Windows machine.



The specific error



When I try the command python import sys, it gives me the error message "E887: Sorry, this command is disabled, the Python's site module could not be loaded." This error message would also occur when I try to invoke VOom and Vim-Latex-Suite, two Vim-plugins.



My installation attempts:



I adhere to the following two guidelines/restrictions:





  • Restriction 1: The version of Python



    According to the following discussions, it is clear that Vim may only work with Python 2.7.9 on Windows. Also, we shall match the 32-bit Vim with a 32-bit Python.




    • Ref 1: https://stackoverflow.com/questions/32025090/vim-for-windows-python-doesnt-load-properly-crashes

    • Ref 2: https://vi.stackexchange.com/questions/6294/how-do-i-use-python-plugins-on-windows




  • Restriction 2: The order of installation



    The gvim.exe shall need to see the python27.dll and the python33.dll. (This is accessible through :version in Vim.) So, one needs to install the Python distributions first, and then install the Vim executables. Yet, it is unclear to me if two versions of Python may exist on one Windows machine in harmony. So, I have never had the python33.dll available on my machine. Yet, gvim.exe may only complain about python27.dll should it have been missing. So far, I have never installed a Python 3.3 and I have never seen the Gvim complaining about the missing python33.dll. This also confused me.




Nevertheless, I still cannot get Vim to work with "a proper Python distribution".



Help needed!



Inexperienced with program developing, I am really having a hard time debugging this issue. Any advice would help!



As of now, I am trying to set up a complete installation of Cygwin, in hope that it may build a local Vim distribution; also, I am also attempting to pursue another route: to compile the source file of Vim using Visual Studio. Simply completely installing these two softwares takes hours.



Hope someone may help!



All the best,



-Linfeng







installation vim python cygwin gvim






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 30 '17 at 14:40









Ramhound

21.2k156287




21.2k156287










asked Jul 5 '16 at 19:10









llinfengllinfeng

290114




290114













  • In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

    – llinfeng
    Jul 5 '16 at 19:10













  • Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

    – matzeri
    Jul 5 '16 at 21:23











  • To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

    – llinfeng
    Jul 6 '16 at 2:46











  • @matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

    – llinfeng
    Jul 6 '16 at 2:48











  • Install a vim binary from here and don't forget to install the required python interpreter as well.

    – Christian Brabandt
    Jul 7 '16 at 7:38



















  • In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

    – llinfeng
    Jul 5 '16 at 19:10













  • Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

    – matzeri
    Jul 5 '16 at 21:23











  • To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

    – llinfeng
    Jul 6 '16 at 2:46











  • @matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

    – llinfeng
    Jul 6 '16 at 2:48











  • Install a vim binary from here and don't forget to install the required python interpreter as well.

    – Christian Brabandt
    Jul 7 '16 at 7:38

















In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

– llinfeng
Jul 5 '16 at 19:10







In completion of the Downloading links: 1. The plain Vim version from Vim Cream, accessible from: sourceforge.net/projects/cream/files/Vim 2. The "official", yet obsolete Vim installer, from: vim.sourceforge.net/download.php#pc 3. "Home built" Vim distributions released by kindhearted individuals: * tuxproject.de/projects/vim * solar-blogg.blogspot.com/p/vim-build.html

– llinfeng
Jul 5 '16 at 19:10















Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

– matzeri
Jul 5 '16 at 21:23





Installing a complete Cygwin is not recommended. There are ~ 4000 packages mostly irrelevant to your need. Cygwin has vim, gvim and python, but I have not understood what are you really looking for.

– matzeri
Jul 5 '16 at 21:23













To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

– llinfeng
Jul 6 '16 at 2:46





To clarify: I would like to have a gvim.exe with Python enabled. As described, I failed to achieve so. Basically, I can find all the check marks for +python/dyn and +python3/dyn through command :version, yet get the error message for :python being disabled.

– llinfeng
Jul 6 '16 at 2:46













@matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

– llinfeng
Jul 6 '16 at 2:48





@matzeri: thanks for pointing out the redundant packages for Cygwin. I plan to use it to build a python-enabled gvim.exe. Though, I have no idea if this may work. Days have been spent on this issue already, after I "upgraded" from Windows 8.1 to Windows 10.

– llinfeng
Jul 6 '16 at 2:48













Install a vim binary from here and don't forget to install the required python interpreter as well.

– Christian Brabandt
Jul 7 '16 at 7:38





Install a vim binary from here and don't forget to install the required python interpreter as well.

– Christian Brabandt
Jul 7 '16 at 7:38










1 Answer
1






active

oldest

votes


















0














Longer explanation



Long story spoken in the long way: what has been missing is not the "Python support" part (+python/dyn and +python3/dyn). Nearly all GVim installers available to the Windows users have built-in Python support. What has been really missing, is that Python don't know how to call the Python program. Thus, all you need to do is to guide a Python-enabled GVim to find python.exe.



Short solution



Add the following line to the _vimrc:




  • let $PYTHONHOME = 'C:/Users/UserName/AppData/Local/Continuum/Anaconda2/'


Generalized solution



In short, you need to first find any folder that contains python.exe. Then, please specify the $PYTHONHOME path correctly to such folder.






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%2f1097273%2fhow-to-install-gvim-exe-on-windows-with-python-support%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Longer explanation



    Long story spoken in the long way: what has been missing is not the "Python support" part (+python/dyn and +python3/dyn). Nearly all GVim installers available to the Windows users have built-in Python support. What has been really missing, is that Python don't know how to call the Python program. Thus, all you need to do is to guide a Python-enabled GVim to find python.exe.



    Short solution



    Add the following line to the _vimrc:




    • let $PYTHONHOME = 'C:/Users/UserName/AppData/Local/Continuum/Anaconda2/'


    Generalized solution



    In short, you need to first find any folder that contains python.exe. Then, please specify the $PYTHONHOME path correctly to such folder.






    share|improve this answer




























      0














      Longer explanation



      Long story spoken in the long way: what has been missing is not the "Python support" part (+python/dyn and +python3/dyn). Nearly all GVim installers available to the Windows users have built-in Python support. What has been really missing, is that Python don't know how to call the Python program. Thus, all you need to do is to guide a Python-enabled GVim to find python.exe.



      Short solution



      Add the following line to the _vimrc:




      • let $PYTHONHOME = 'C:/Users/UserName/AppData/Local/Continuum/Anaconda2/'


      Generalized solution



      In short, you need to first find any folder that contains python.exe. Then, please specify the $PYTHONHOME path correctly to such folder.






      share|improve this answer


























        0












        0








        0







        Longer explanation



        Long story spoken in the long way: what has been missing is not the "Python support" part (+python/dyn and +python3/dyn). Nearly all GVim installers available to the Windows users have built-in Python support. What has been really missing, is that Python don't know how to call the Python program. Thus, all you need to do is to guide a Python-enabled GVim to find python.exe.



        Short solution



        Add the following line to the _vimrc:




        • let $PYTHONHOME = 'C:/Users/UserName/AppData/Local/Continuum/Anaconda2/'


        Generalized solution



        In short, you need to first find any folder that contains python.exe. Then, please specify the $PYTHONHOME path correctly to such folder.






        share|improve this answer













        Longer explanation



        Long story spoken in the long way: what has been missing is not the "Python support" part (+python/dyn and +python3/dyn). Nearly all GVim installers available to the Windows users have built-in Python support. What has been really missing, is that Python don't know how to call the Python program. Thus, all you need to do is to guide a Python-enabled GVim to find python.exe.



        Short solution



        Add the following line to the _vimrc:




        • let $PYTHONHOME = 'C:/Users/UserName/AppData/Local/Continuum/Anaconda2/'


        Generalized solution



        In short, you need to first find any folder that contains python.exe. Then, please specify the $PYTHONHOME path correctly to such folder.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 30 '17 at 14:36









        llinfengllinfeng

        290114




        290114






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1097273%2fhow-to-install-gvim-exe-on-windows-with-python-support%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

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix