Ubuntu 16.04 VIM without python support!

Although Ubuntu 16.04 release notes mention that:

The default VIM package has been built against python3 instead of python2.

Yet after I installed vim with the following command:

sudo apt-get install vim

And checked:

vim --version

It showed:

-python
-python3

Is it a bug? How do I get vim with Python support?


Solution 1:

If you want Python 3 support in vim, install the vim-nox package (sudo apt install vim-nox) see edit below.

However, if you still need Python 2 support, install the vim-nox-py2 package (sudo apt install vim-nox-py2).

Edit: vim was recently updated to fix this issue, and you should not need to install the vim-nox package anymore to get Python 3 support.

Solution 2:

In 17.10-18.10 it is difficult to get a copy of vim with both python2 and python3 support. The PPA setup by pi-rho has such packages for previous releases, but nothing yet for 17.10 and later.

This is what I did to get pi-rho packages running:

  1. uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
  2. download the vim packages from here that end in a "~z"
  3. download the packages perl-modules-5.24,libgdbm3, and libperl5.24
  4. install them using dpkg: go to the download directory and do sudo dpkg -i libgdbm3_1.8.3-14_amd64.deb libperl5.24_5.24.1-2ubuntu1.1_amd64.deb perl-modules-5.24_5.24.1-2ubuntu1.1_all.deb vim*.deb
  5. reinstall "ubuntu-minimal": sudo apt install ubuntu-minimal
  6. lock the vim version
    • open synaptic package manager and highlight the vim packages you just installed. Go to Package->"Lock Version"
    • you may also need to "hold" the packages with sudo apt-mark hold for each of those packages (e.g. sudo apt-mark hold vim-common vim-gnome)

Solution 3:

Try installing vim-gnome instead of vim.

sudo apt-get install vim-gnome

If that can help, you can install the package python-support by downloading the latest version of python-support_X.X.X_all.deb there : https://launchpad.net/ubuntu/+source/python-support Open a terminal in same folder and install with:

dpkg -i python-support_X.X.X_all.deb

See if it helps