2016-08-18 6 views
2

을 "YouCompleteMe 사용할 수없는이 패키지는 파이썬 3에 액세스 할 수 없습니다해야한다", 나는 다음과 같은 오류 얻을 : 그러나오류 : 나는 정력에 YouCompleteMe 플러그인을 사용하려고 할 때

YouCompleteMe unavailable: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted

을, I 가상 환경에서 vim을 열 때만이 오류가 발생합니다. 그것은 virtualenv가 활동적이지 않을 때 잘 작동합니다. 내 생각 엔 YouCompleteMe는 Python 2로 작성되었으며, 어떤 이유에서든 가상 환경 내부에서 파이썬 2 인터프리터를 볼 수는 없지만이를 수정하는 방법을 모르겠습니다. 제목에 스택 오버플로 질문이없는 것 같지만 비슷한 문제가 ycm-users Google 그룹에 올라와 답변을 얻지 못했습니다.

저는 vim 버전 7.4를 사용하여 Ubuntu 14.04를 사용하고 있습니다.

답변

1

보이는 :

합병 위의 풀 요청으로

In PR #448, I made the assumption that the site-packages paths are always placed after the standard library path so that if we insert the python-future module just before the first site-packages path, it would necessary be after the standard library. Turns out that it is not true when a site-packages path is added to the PYTHONPATH environment variable, e.g, when using the software ROS. See issue Valloric/YouCompleteMe#2186. When this happens, the python-future module will raise the following exception on Python 3:

ImportError: This package should not be accessible on Python 3. 
Either you are trying to run from the python-future src folder or 
your installation of python-future is corrupted. 

We prevent this by looking for the standard library path in sys.path and by inserting the python-future module just after it. If we can't find it, we raise an exception since YCM and ycmd cannot work without it.

Fixes Valloric/YouCompleteMe#2186

https://github.com/Valloric/ycmd/pull/578

, 당신은 문제를 해결 할 수 있어야한다 업데이트를 가져 오거나 repo를 아직 복제하지 않은 상태에서 복제 한 다음 재설치하여 문제를 해결하십시오.

+0

아, 며칠 전에 그 문제를 살펴 봤지만 문제를 해결 한 마지막 날에 커밋 승/그랬던 것처럼 보입니다. 나는 그것을 줄 것이다. 감사! –

0

virtualenv 내부에서 파이썬 3을 사용하고있는 것처럼 들립니다. 이 버그처럼 지금까지 정력이, 당신이 YCM에서 지원하지 않는 파이썬 3를 실행에 관한 한

https://github.com/Valloric/YouCompleteMe/issues/1140

해결 방법이 VIRTUALENV 외부에서 열어 정력에 될 것

+0

나는 같은 github 문제를 발견했습니다. 그러나 그것이 2014 년부터이며 YouCompleteMe의 [readme] (https://github.com/Valloric/YouCompleteMe)에서 현재 Python 3을 지원한다고 나와 있습니다. YouCompleteMe 자체에 문제가 있는지 잘 모르겠습니다. 그것은 virtualenv의 사용과 관련이 있습니다. virtulenv 외부에서 정력을 열 수는 있지만 YouCompleteMe는 내가 사용하고있는 라이브러리를 볼 수 없으므로 목적을 이깁니다. 파이썬 파일에서 YCM을 사용하지 못하게하고 대신 jedi-vim을 사용할 수 있는지 확인할 수 있습니다. –

관련 문제