-
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
YouCompleteMe unavailable+ Symbol not foun d: __PyCodecInfo_GetIncrementalDecoder #2218
Comments
Try rebuilding (re-runing install.py). It seems that the version of libpython that is being found at runtime is not the same as the one linked against at compile time. In any case, this is an issue with your environment, not a bug, so closing per CONTRIBUTING.md |
Thanks for your answer! Maybe I need to read CONTRIBUTING document firstly, but I can't wait to solve this problem, because YouCompleteMe is really cool! Good luck to me! |
I have the exactly same problem after fresh install of YCM with Python 2.7.11. When opening vim:
And then I don't have any YCM command on vim to debug. |
I encountered the same problem. Couldn't find the file at /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so manually. I tried to reinstall python You can force it to link using but be sure to check the changes using |
I have the same problem with OS X EI Captian 10.11.5.
Hope someone can tell me the reason. |
+1 |
Apologies, it works fine with latest MacVim from here: https://github.com/macvim-dev/macvim/releases (as provided in your docs) |
I am also having this problem on 10.11.6 |
Not sure if this helps anyone but me... I found that I had two versions of MacVim installed.
When I was running It appears that |
Kudos to @F1LT3R 's solution, since it worked for me as well. I did the following:
Fixed it for me! Cheers :) |
I have the same problem, not with the Home-brew vim of version 8, but with the OSX default vim at |
@oscar-c I got the same issue. And your solution |
I figured out it's about This is a wired behavior about vim, when brew |
This is because mac system requires The result is: # install by brew
brew install python
# python path, this will be used when make vim
which python
# output: /usr/local/bin/python
# and its version:
$(which python) --version
# output: Python 2.7.12
# but the real python version:
python --version
# output: Python 2.7.10 And you cannot remove system default sudo rm -f /usr/bin/python
# Password:
# rm: /usr/bin/python: Operation not permitted And then you may need to re-configure and make vim again. Don't forget to clean previous configure output, because the path of python will be cache. # The most radical way to clean cache
rm -rf ./*
git co -- . |
@oscar-c's solution worked for me:
I swapped the order of those two and the error immediately went away.
|
@benjamincharity @oscar-c But shouldn't /usr/local/bin be before /usr/bin in your $PATH to give brew's packages precedence? Brew will complain if you run |
@sksea that is why I only doing it in the |
@oscar-c missed that part, thanks for clarifying |
Just about gave up on YCM and mac, but found a weird solution that worked for me. I created a virtual python evn and ran ./install.py - this works and YCM works. deactivate and YCM still works, so win / win for me. I can finally enjoy YCM Hope this helps someone else. |
@oscar-c think you very much |
For me, the cause was a different version of @F1LT3R's: |
I have not perfect solution
You can use your compiler installed by brew other than Apple,but it not woks for python itself. Hope author can solve it or invent a method to run install.py with correct python compiler |
@xwind thank you, really elegant way |
For me, it seems like either the homebrew cask version MacVim (I use the cask version so it links properly to /Applications. I know there's other ways to do this, but... that's the way I chose to do it) or the homebrew version of vim was interfering with something (or maybe I hadn't installed them properly in the first place). I fixed this by doing
After that, YouCompleteMe is working as expected. |
@faithfracture's worked for me, though with the following changes:
|
Running
worked for me |
This works with me though: |
This would work in the following two combinations.
Detailed steps for those who want to retain brew python
System version of vim doesn't bade well with brew python version. |
I happend install a package which depends on python@2, and this caused an upgrade of python@2 from 2.7.14_2 to 2.7.15_1 , but the origin vim installed by |
It seems that I used brew to upgrade python from 2 to 3 so that something is missing for python2
then the error went way. |
if you install python3, then uninstall python3 |
Where is the solution then? I've tried all above and nothing works. |
when I use vim open a file. One error happened, YouCompleteMe unavailable: dlopen(/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.fr |
I still get the original error:
Note: I'm using MacVim from the When I run But this doesn't explain why YCM complains when I have homebrew-python first in my PATH. I tried these two commands, both work: What I found odd is that when homebrew-python is first in PATH, and I run When I run
Why does |
From your vim, does |
Seems to be a recent MacVim regression, see macvim-dev/macvim#803 |
I was able to get the binary installed by doing
Ensuring the Python that you're running and the Python you invoke when running |
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
Frequently Asked Questions section.
about to report and couldn't find an answer to my problem. (Example Google
search.)
vim --version
.:YcmDebugInfo
.:YcmToggleLogs stderr
.version) I am using.
my issue.
that any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]
in my macbook air,I meet this problem,how to solve it?I need your help!3Q!
YouCompleteMe unavailable: dlopen(/usr/local/Cellar/python/2.7.11/Frameworks/Pyt
hon.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not foun
d: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/V
ersions/2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib
/python2.7/lib-dynload/_io.so
The text was updated successfully, but these errors were encountered: