-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix install script so it finds the correct Python. #128
Conversation
I'm going to have to test this out before merging but don't have the time right now. Possibly later today. Thanks for the pull request! The wrong-Python-version nonsense is the most reported issue for YCM. |
Yea. I highly suggest we don't merge this until we've tested several configurations. |
Okay. |
Works great on my machine (Mac OS X 10.8.2, only system Python, latest upstream official MacVim binary). I'll note that I'm slightly worried by the fact that previously cmake would say God knows I've had enough of the Python-related install problems (and issues on the tracker) on Mac. Hopefully this will put those to rest. |
Not sure this solved the problem as I still had to |
The crux of the issue is there is simply no good way of determining what Python version someone's copy of Vim or MacVim was linked against. Typically a makefile configuration will link against whatever the active Python version is found on the system. There was an inconsistency with how CMake does this, which is what this fix resolved. Moving forward, I will try and get another pull request in which provides an additional optional parameter to the YCM install script which will allow the user to force a specific version. Beyond that its up to the user to make sure they are properly setting up their environment. |
This fixes #18 and maybe some other related issues. In particular with homebrew python installations.
Similar fixes are done in various homebrew formula. For example, see: https://github.com/mxcl/homebrew/blob/51d054c/Library/Formula/opencv.rb#L50-73
There are a couple of other problems, but I don't think YouCompleteMe can do anything about them, as they are configuration issues with other projects.
For instance, homebrew vim works with the above fix, but homebrew macvim does not (at least I couldn't get it to without editing the formula), because the macvim seems bent on using system python.
Fix tested with:
OSX 10.7.5
Homebrew
Python (2.7.3) installed with homebrew
Vim 7.3 (patches 1-820) installed with homebrew