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?
apt python 16.04 vim python3
add a comment |
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?
apt python 16.04 vim python3
add a comment |
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?
apt python 16.04 vim python3
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?
apt python 16.04 vim python3
apt python 16.04 vim python3
edited Jan 21 '17 at 11:10
Zanna
50.7k13135241
50.7k13135241
asked Apr 29 '16 at 10:47
Saprativa BhattacharjeeSaprativa Bhattacharjee
5423610
5423610
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
If you want Python 3 support in vim, install the see edit below.vim-nox
package (sudo apt install vim-nox
)
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.
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
Just wanted to add that after installingvim-nox-py2
I needed to runsudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without thisvim
points tovim.tiny
or some such package which doesn't have python support.
– DBS
Oct 14 '16 at 0:52
|
show 1 more comment
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
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
add a comment |
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:
- uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
- download the vim packages from here that end in a "~z"
- download the packages perl-modules-5.24,libgdbm3, and libperl5.24
- 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
- reinstall "ubuntu-minimal":
sudo apt install ubuntu-minimal
- 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
)
add a comment |
On Ubuntu 17.10, compiling is the solution that worked for me:
Directly inspired by this gist, I did the following:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd /tmp && git clone https://github.com/vim/vim
cd vim/src
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="put your name here" --enable-fail-if-missing
make
sudo make install
sudo ln -s /usr/local/bin/vim /usr/bin/vim
Don't forget to adapt the ./configure
parameters so you have all the other features you need.
Now you can open vim and run the command :echo has('python')
to confirm you have python 2 enabled.
add a comment |
Installing vim-nox-py2
and then running
sudo update-alternatives --config vim
worked for me.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f764882%2fubuntu-16-04-vim-without-python-support%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you want Python 3 support in vim, install the see edit below.vim-nox
package (sudo apt install vim-nox
)
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.
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
Just wanted to add that after installingvim-nox-py2
I needed to runsudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without thisvim
points tovim.tiny
or some such package which doesn't have python support.
– DBS
Oct 14 '16 at 0:52
|
show 1 more comment
If you want Python 3 support in vim, install the see edit below.vim-nox
package (sudo apt install vim-nox
)
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.
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
Just wanted to add that after installingvim-nox-py2
I needed to runsudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without thisvim
points tovim.tiny
or some such package which doesn't have python support.
– DBS
Oct 14 '16 at 0:52
|
show 1 more comment
If you want Python 3 support in vim, install the see edit below.vim-nox
package (sudo apt install vim-nox
)
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.
If you want Python 3 support in vim, install the see edit below.vim-nox
package (sudo apt install vim-nox
)
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.
edited Jul 1 '16 at 1:40
answered Apr 29 '16 at 23:29
saiarcot895saiarcot895
9,46422333
9,46422333
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
Just wanted to add that after installingvim-nox-py2
I needed to runsudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without thisvim
points tovim.tiny
or some such package which doesn't have python support.
– DBS
Oct 14 '16 at 0:52
|
show 1 more comment
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
Just wanted to add that after installingvim-nox-py2
I needed to runsudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without thisvim
points tovim.tiny
or some such package which doesn't have python support.
– DBS
Oct 14 '16 at 0:52
1
1
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
yeah i did that..but why is the vim package not supporting python?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
Ubuntu split the Python support from the main package into two other packages: one that supports Python 2 and one that supports Python 3. After you install one of the above packages, you should be able to use vim with Python 2/3 support.
– saiarcot895
Apr 30 '16 at 12:44
1
1
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
isn't it surprising that the vim package itself doesn't support any of the pythons? the release notes mention otherwise. wiki.ubuntu.com/XenialXerus/ReleaseNotes
– Saprativa Bhattacharjee
May 1 '16 at 7:33
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
@saiarcot895 This apparently works for me. But where did you dig this info up? Is there a Ubuntu wiki documenting how they distribute stuff?
– qweruiop
Jun 14 '16 at 14:25
2
2
Just wanted to add that after installing
vim-nox-py2
I needed to run sudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without this vim
points to vim.tiny
or some such package which doesn't have python support.– DBS
Oct 14 '16 at 0:52
Just wanted to add that after installing
vim-nox-py2
I needed to run sudo update-alternatives --set vim /usr/bin/vim.nox-py2
. I believe, please correct me otherwise, without this vim
points to vim.tiny
or some such package which doesn't have python support.– DBS
Oct 14 '16 at 0:52
|
show 1 more comment
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
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
add a comment |
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
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
add a comment |
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
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
answered Apr 29 '16 at 12:19
FluffyFluffy
226210
226210
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
add a comment |
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
is that a gui version?
– Saprativa Bhattacharjee
Apr 30 '16 at 5:43
add a comment |
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:
- uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
- download the vim packages from here that end in a "~z"
- download the packages perl-modules-5.24,libgdbm3, and libperl5.24
- 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
- reinstall "ubuntu-minimal":
sudo apt install ubuntu-minimal
- 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
)
add a comment |
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:
- uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
- download the vim packages from here that end in a "~z"
- download the packages perl-modules-5.24,libgdbm3, and libperl5.24
- 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
- reinstall "ubuntu-minimal":
sudo apt install ubuntu-minimal
- 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
)
add a comment |
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:
- uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
- download the vim packages from here that end in a "~z"
- download the packages perl-modules-5.24,libgdbm3, and libperl5.24
- 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
- reinstall "ubuntu-minimal":
sudo apt install ubuntu-minimal
- 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
)
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:
- uninstall all vim packages (this will force you to uninstall "ubuntu-minimal")
- download the vim packages from here that end in a "~z"
- download the packages perl-modules-5.24,libgdbm3, and libperl5.24
- 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
- reinstall "ubuntu-minimal":
sudo apt install ubuntu-minimal
- 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
)
edited Jan 4 at 13:45
answered Dec 4 '17 at 8:58
krumpelstiltskinkrumpelstiltskin
1,17721325
1,17721325
add a comment |
add a comment |
On Ubuntu 17.10, compiling is the solution that worked for me:
Directly inspired by this gist, I did the following:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd /tmp && git clone https://github.com/vim/vim
cd vim/src
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="put your name here" --enable-fail-if-missing
make
sudo make install
sudo ln -s /usr/local/bin/vim /usr/bin/vim
Don't forget to adapt the ./configure
parameters so you have all the other features you need.
Now you can open vim and run the command :echo has('python')
to confirm you have python 2 enabled.
add a comment |
On Ubuntu 17.10, compiling is the solution that worked for me:
Directly inspired by this gist, I did the following:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd /tmp && git clone https://github.com/vim/vim
cd vim/src
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="put your name here" --enable-fail-if-missing
make
sudo make install
sudo ln -s /usr/local/bin/vim /usr/bin/vim
Don't forget to adapt the ./configure
parameters so you have all the other features you need.
Now you can open vim and run the command :echo has('python')
to confirm you have python 2 enabled.
add a comment |
On Ubuntu 17.10, compiling is the solution that worked for me:
Directly inspired by this gist, I did the following:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd /tmp && git clone https://github.com/vim/vim
cd vim/src
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="put your name here" --enable-fail-if-missing
make
sudo make install
sudo ln -s /usr/local/bin/vim /usr/bin/vim
Don't forget to adapt the ./configure
parameters so you have all the other features you need.
Now you can open vim and run the command :echo has('python')
to confirm you have python 2 enabled.
On Ubuntu 17.10, compiling is the solution that worked for me:
Directly inspired by this gist, I did the following:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd /tmp && git clone https://github.com/vim/vim
cd vim/src
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="put your name here" --enable-fail-if-missing
make
sudo make install
sudo ln -s /usr/local/bin/vim /usr/bin/vim
Don't forget to adapt the ./configure
parameters so you have all the other features you need.
Now you can open vim and run the command :echo has('python')
to confirm you have python 2 enabled.
answered Feb 7 '18 at 15:55
vtelliervtellier
17115
17115
add a comment |
add a comment |
Installing vim-nox-py2
and then running
sudo update-alternatives --config vim
worked for me.
add a comment |
Installing vim-nox-py2
and then running
sudo update-alternatives --config vim
worked for me.
add a comment |
Installing vim-nox-py2
and then running
sudo update-alternatives --config vim
worked for me.
Installing vim-nox-py2
and then running
sudo update-alternatives --config vim
worked for me.
edited Apr 14 '18 at 19:41
Zanna
50.7k13135241
50.7k13135241
answered Apr 14 '18 at 19:01
Jemshid KKJemshid KK
214
214
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f764882%2fubuntu-16-04-vim-without-python-support%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown