Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load python module when Vundle installed to .vim on Windows 10 #1894

Closed
TimothyWrightSoftware opened this issue Jan 11, 2016 · 15 comments

Comments

@TimothyWrightSoftware
Copy link

I followed the Vundle installation guide but it put all the plugins into a .vim folder in my $HOME folder instead of in the vimfiles folder. YouCompleteMe compiled but when vim starts there is an error. Cannot load the python module.

On a guess I moved Youcompleteme vim plugin to my vimfiles/Bundles folder and removed it from Vundle, then everything works.

@micbou
Copy link
Collaborator

micbou commented Jan 11, 2016

Did you try to set the runtimepath like explained in the Vundle for Windows documentation?

@TimothyWrightSoftware
Copy link
Author

Yes, i tried many different ways with '/' and '' but to no success. I'm sure I won't be the only one who has this problem. It may be a Vundle issue, but it wasn't obvious since the install worked for all my other plugins

@micbou
Copy link
Collaborator

micbou commented Jan 11, 2016

So, this is specific to YCM. That's strange. I'll need to do some tests with Vundle since I am not using it for my plugins.

@micbou
Copy link
Collaborator

micbou commented Jan 11, 2016

I tried to install YCM and other plugins using Vundle with the following vimrc:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/vim-vundle/bundle/Vundle.vim

call vundle#begin('~/vim-vundle/bundle')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Plugin 'scrooloose/syntastic'
Plugin 'sirver/ultisnips'
Plugin 'Valloric/YouCompleteMe'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

and I didn't encounter any issue. All plugins were installed in ~/vim-bundle/bundle. Obviously, you can replace ~/vim-bundle by ~/vimfiles and it will work the same. So, I am wondering if your vimrc is properly configured. Could you try with the above .vimrc?

@TimothyWrightSoftware
Copy link
Author

That worked just fine. I was using the Vundle windows directions: https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows
which set the path differently

@TimothyWrightSoftware
Copy link
Author

Did a fresh install, but it is happening again, and this time I am using the posted vimrc. Premature close I guess

@micbou
Copy link
Collaborator

micbou commented Jan 15, 2016

Could you paste the contents of your .vimrc?

@TimothyWrightSoftware
Copy link
Author

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle.vim

call vundle#begin('~/vimfiles/bundle')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Plugin 'scrooloose/syntastic'
Plugin 'sirver/ultisnips'
Plugin 'Valloric/YouCompleteMe'

" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required

@TimothyWrightSoftware
Copy link
Author

Also, I'm not sure it was ever working. I tried to install it the way I did before but that's not working either. When the error message went away, it was because the plugin was not being loaded at all. I only figured this out when I finally got the .ycm_extra_conf.py python script setup and it was never compiled.

@micbou
Copy link
Collaborator

micbou commented Jan 15, 2016

Do you see any YCM error when starting Vim and typing :messages? What is the output of the :YcmDebugInfo command in Vim?

@TimothyWrightSoftware
Copy link
Author

Yes, there are error messages. I will post them when I get home. (about 10 hrs) From memory, something about the Python site module cannot be loaded.

@TimothyWrightSoftware
Copy link
Author

If there is some way for me to run the python script in a debugger or something more aggressive just let me know. I'm glad to help, and thank you for all of yours!

@micbou
Copy link
Collaborator

micbou commented Jan 15, 2016

No need, I know about this issue. It is a bug with Python 2.7.11 on Windows. I posted some workarounds in this issue. I recommend to use Python 2.7.10 until the next version is released.

@TimothyWrightSoftware
Copy link
Author

awesome. Thank you so much.

@TimothyWrightSoftware
Copy link
Author

Worked like a charm. Thanks again

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants