Published - 6 years ago ( Updated - 6 years ago )
foreword
If you use Vim preset for the Mac system, will there be an error that python2.7 or python3 is required when executing the terminal, but the system obviously has python 2.7? This article explains how I can fix this problem.
my way
As far as I know, this problem can be solved by installing compiled vim through homebrew, but it is not difficult to compile Vim on MacOs, so I compiled it myself.
To have gcc commands on MacOs, you need to install Xcode.
step:
1. Install the latest official version of python3
https://www.python.org/
2. Download vim official source
Fourth, it is best to perform a
5. Configuration
Or on ubuntu 16.0.4, available
Six,
7.
You can install the self-compiled vim to the /usr/local/bin/vim directory.
7. Set the alias of vim='/usr/local/bin/vim' to .bash_profile or .zshrc by yourself, please decide according to your own environment.
It is normal to execute vim again.
To have gcc commands on MacOs, you need to install Xcode.
step:
1. Install the latest official version of python3
https://www.python.org/
2. Download vim official source
git clone https://github.com/vim/vim
3. Enter the folder of cd vim
and execute the configurationFourth, it is best to perform a
make distclean
5. Configuration
./configure –enable-multibyte \
--enable-fontset \
--enable-python3interp=yes
If there is no error related to --with-tlib, it means that the ncurses library is missing. We can install it with the following command:sudo apt-get install libncurses5-dev libncursesw5-dev
Or on ubuntu 16.0.4, available
sudo apt-get install ncurses-dev
Six,
make
7.
sudo make install
You can install the self-compiled vim to the /usr/local/bin/vim directory.
7. Set the alias of vim='/usr/local/bin/vim' to .bash_profile or .zshrc by yourself, please decide according to your own environment.
It is normal to execute vim again.
No Comment
Post your comment