簡體   English   中英

在 CentOS 上使用 python 2 和 3 安裝 Vim; Python 3 版本太舊

[英]Installing Vim with python 2 and 3 on CentOS; Python 3 version is too old

我正在嘗試從 CentOS 上支持 python2 和 python3 的源代碼編譯 Vim,因為 Black 格式化程序需要 python3。 我正在遵循 YouCompleteMe 指南( https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source )。 但是 ./configure 失敗,說 python3 太舊了。 盡管我提供了那個二進制文件,但似乎對運行哪個二進制文件感到困惑。

我在其他幾個版本中安裝了 python3.6。 我讀到 Debian 不能同時安裝 Vim,但沒有提到 RHEL。

這是我的 ./configure 命令:

./configure --with-features=huge \
        --enable-multibyte \
        --enable-rubyinterp=yes \
        --enable-pythoninterp=yes \
        --with-python-command=python2.7 \
        --with-python-config-dir=/usr/lib64/python2.7/config \
        --enable-python3interp=yes \
        --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
        --with-python3-command=python3.6 \
        --enable-gui=gtk2 \
        --enable-cscope \
        --prefix=/usr/local \
        --enable-fail-if-missing \

./configure 失敗,結果如下:

checking Python version... (cached) 2.7
checking Python is 2.3 or better... yep
checking Python's install prefix... (cached) /usr
checking Python's execution prefix... (cached) /usr
(cached) checking Python's configuration directory... (cached) /usr/lib64/python2.7/config
(cached) checking Python's dll name... (cached) libpython2.7.so.1.0
checking if -pthread should be used... yes
checking if compile and link flags for Python are sane... yes
checking --enable-python3interp argument... yes
checking --with-python3-command argument... python36
checking Python version... (cached) 2.7
checking Python is 3.0 or better... too old
configure: error: could not configure python3

那么......我如何解決這個問題並使其工作?

為 python3 安裝開發包

yum install python3-devel*

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM