Reinstall vim with python3 support - python-3.x

I installed Vim 7.4 a few months ago (sudo apt-get install vim) on Ubuntu 16.04 and now I'm trying to install plugins that require python3 support.
How can I reinstall/uppgrade vim to support python3?

sudo apt install vim-nox
Fixed it for me. Didn't even have to uninstall my current vim or anything else. Thanks to Romainl for your comment!

Related

Vim syntax highlighting didn't work in Ubuntu 16.04

Recently I reinstall ubuntu. When I install vim in new ubuntu 16.04 OS syntax highlighting of PHP, JS has gone.
I install vim by using this command
sudo apt-get install vim
When syntax highlighting hasn't work, I reinstall vim by using this command.
sudo apt-get purge vim; sudo apt-get install vim
But still didn't work. Screenshot of PHP file which is opened by vim is given below.

Gvim installation on vim-7.4

I want vim-gtk to use vim 7.4 which I installed from source, but gvim is opening with 7.3 itself.
On A fresh linuxmint, after updating system, I removed already existing vim, than installed vim 7.4 from source and it is perfect installation, everything went fine, and than installed ,
sudo apt-get install vim-gtk
than when I enter gvim, gvim is 7.3 not already existing 7.4!!! and if I enter vim from terminal than its vim-7.4.
I will be thankful if anyone helped me to run gvim on vim 7.4
Two things…
First, $ sudo apt-get install vim-gtk only uses your repositories (which are certainly frozen at 7.3.something), it doesn't care at all about what you installed manually.
Second, GVim is not a separate frontend that you add to an existing Vim: it is Vim, built with GUI support and either launched as gvim or as vim -g.
You could:
uninstall vim-gtk and re-compile Vim manually following these instructions (note the --enable-gui=gtk2)
or find an up-to-date ppa on LaunchPad.net, add it to your software sources and redo $ sudo apt-get install vim-gtk.
just install vim-gnome and vim-gui and reboot.It worked for me.
Maybe this post will help you install gvim 7.4. There are few steps:
Install the needed dependencies:
$ sudo apt-get install ncurses-dev build-essential mercurial
Clone the sources of Vim 7.4:
$ hg clone https://vim.googlecode.com/hg/ vim
Build Vim from sources:
$ cd vim/src
$ make distclean
$ ./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp
$ make
$ sudo make install
Adjust the PATH:
$ export PATH=/usr/local/bin:$PATH
I used this guide and get gvim 7.4.54.

UltiSnips requires py >= 2.6 or any py3

I'm trying to install UltiSnips in different way but the same message appears each time when I launch vim.
Python 2.7 is installed but it seems that vim has been installed before the 2.7 version.
I tryed to reinstall vim using this link:
$ sudo apt-get install mercurial libssl-dev
$ sudo apt-get build-dep vim
$ hg clone http://hg.debian.org/hg/pkg-vim/vim
$ cd vim
$ hg checkout unstable
$ debian/rules update-orig
$ dpkg-buildpackage -i -I
$ cd ..
But the same problem remains.
Thanks
You don't provide much information to help. You can check whether your Vim has Python via :py print "yes". For the Python version, check the :version output. It will contain something like -lpython2.7.
When you compile Vim yourself, you need to enable the Python integration by passing ./configure --enable-pythoninterp.
I had the same problem with NeoVim on Ubuntu. Running :CheckHealth pointed me into the right direction. Creating the following softlink solved the problem for me:
sudo ln -s /usr/bin/python /usr/local/bin/python
Maybe obvious to most, but not to me was the fact that the neovim module had to be installed. On ubuntu, installing it using pip did the trick for me:
sudo pip3 install neovim
To install the module for python 3, I suppose pip3 has to exchanged for pip for python 2.
Download the source code from http://www.vim.org/.
Then
cd vim
make clean
./configure --prefix=/opt/local --with-features=huge --enable-pythoninterp=yes --enable-multibyte --with-vim-name=vim --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu
make
sudo make install
I had the same problem after installing UltiSnips, my simple solution was to type inside vim :version where python3 wasn't install. I solve this installing vim-gtk3, try sudo apt install vim-gtk3 after installing gtk3 the message disapper and my vim launches normally ;)

Recompiling VIM: apt-get can't find source code?

I'm trying to recompile VIM with clipboard support and I'm attempting to follow this guide.
The trouble is that when I do:
sudo apt-get source vim
I get E: Unable to find a source package for vim, although the package name was auto-completed and exists if you type sudo apt-get source <tab><tab>
By the way, before I started, I did sudo apt-get remove vim.
Any ideas how to proceed?
I'm using Ubuntu 12.04 LTS.
Just do
$ sudo apt-get install vim-gnome
It will install both gvim and vim with clipboard support.

How to uninstall libraries (installed through compile) in Ubuntu?

I tried installing libtiff 4.0.3 through using the commands:
./configure
make
make install
It installed fine. However, I recently found out that I got the versions wrong and so I need to install a new one with a different version. I'd like to how know to remove libtiff from my Ubuntu setup. Would it be the same as sudo apt-get remove [x]? And how do I know what to put on x if I didn't install it through sudo apt-get install [x] command? Would appreciate some help. Thanks. :)
You can't use apt-get to remove something that wasn't installed as a package. Try running make uninstall. – Blender

Resources