2017-02-16 2 views
1

최근 내 컴퓨터에서 자작 (brew install vim)을 통해 vim을 업그레이드했습니다. 이것은 또한 파이썬을 업데이트하지만 그렇게 할 수없고 NameError: name 'PROTOCOL_TLS' is not defined 오류로 실패합니다. 나는이 설치 얻을 방법을 알아낼 수없는 것homebrew를 통해 최신 버전의 vim을 설치할 때 PROTOCOL_TLS 오류가 발생했습니다.

$ brew install vim 
==> Installing dependencies for vim: python 
==> Installing vim dependency: python 
==> Downloading https://homebrew.bintray.com/bottles/python-2.7.13.sierra.bottle.tar.gz 
Already downloaded: /Users/me/Library/Caches/Homebrew/python-2.7.13.sierra.bottle.tar.gz 
==> Pouring python-2.7.13.sierra.bottle.tar.gz 
==> Using the sandbox 
==> /usr/local/Cellar/python/2.7.13/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/u 
Last 15 lines from /Users/me/Library/Logs/Homebrew/python/post_install.01.python: 
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "/usr/local/Cellar/python/2.7.13/libexec/setuptools/setuptools/command/install_scripts.py", line 17, in run 
    import setuptools.command.easy_install as ei 
    File "/usr/local/Cellar/python/2.7.13/libexec/setuptools/setuptools/command/easy_install.py", line 51, in <module> 
    from setuptools.package_index import (
    File "/usr/local/Cellar/python/2.7.13/libexec/setuptools/setuptools/package_index.py", line 15, in <module> 
    from urllib2 import splituser 
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 94, in <module> 
    import httplib 
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1230, in <module> 
    import ssl 
    File  "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 133, in <module> 
    PROTOCOL_SSLv23 = PROTOCOL_TLS 
NameError: name 'PROTOCOL_TLS' is not defined 
Warning: The post-install step did not complete successfully 
You can try again using `brew postinstall python` 
==> Caveats 
Pip and setuptools have been installed. To update them 
    pip install --upgrade pip setuptools 

You can install Python packages with 
    pip install <package> 

They will install into the site-package directory 
    /usr/local/lib/python2.7/site-packages 

See: http://docs.brew.sh/Homebrew-and-Python.html 
==> Summary 
    /usr/local/Cellar/python/2.7.13: 3,223 files, 44.3M 
==> Installing vim 
==> Downloading https://homebrew.bintray.com/bottles/vim-8.0.0329.sierra.bottle.tar.gz 
Already downloaded: /Users/me/Library/Caches/Homebrew/vim-8.0.0329.sierra.bottle.tar.gz 
==> Pouring vim-8.0.0329.sierra.bottle.tar.gz 
    /usr/local/Cellar/vim/8.0.0329: 1,713 files, 23.3M 

:

다음은 전체 출력됩니다. 이것은 완전히 YouCompleteMe 플러그인뿐만 아니라 borks. vim 시동시 동일한 PROTOCOL_TLS 오류가 표시됩니다.

+0

이것은 자작가 문제 추적기에 대한 질문입니다. – romainl

답변

0

나는 사용자 정의 파이썬 버전을 사용하도록 homebrew에 알려줌으로써이를 해결할 수있었습니다. 이 작업을 올바르게 수행하기 위해 수행 한 단계는 다음과 같습니다.

brew uninstall vim 
brew uninstall python # remove 2.7.13 version 
brew switch python 2.7.12 
brew install vim --with-custom-python 
관련 문제