I try to install vim with python3 support. After a quick research, I learnt that vim-nox installs by default the python3 support. Except that, in my case, I have python2 support. The result of apt-get install vim-nox

Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  ca-certificates-java coinor-libcbc3 coinor-libcgl1 coinor-libclp1
  coinor-libcoinmp1 coinor-libcoinutils3 coinor-libosi1 default-jre
  default-jre-headless firebird2.5-common firebird2.5-common-doc
  firebird2.5-server-common fonts-opensymbol gir1.2-rb-3.0 gir1.2-secret-1
  gir1.2-totem-1.0 hyphen-en-us java-common libabw-0.1-1 libatk-wrapper-java
  libatk-wrapper-java-jni libcdr-0.1-1 libclucene-contribs1 libclucene-core1
  libcmis-0.4-4 libe-book-0.1-1 libeot0 libetonyek-0.1-1 libexttextcat-2.0-0
  libexttextcat-data libfbclient2 libfbembed2.5 libfreehand-0.1-1 libgconf2-4
  libgltf-0.0-0 libgpod-common libgpod4 libhsqldb1.8.0-java libhyphen0
  liblangtag-common liblangtag1 liblircclient0 libmspub-0.1-1 libmwaw-0.3-3
  libmythes-1.2-0 libodfgen-0.1-1 liborcus-0.8-0 librhythmbox-core8 libsctp1
  libsgutils2-2 libtotem0 libvisio-0.1-1 libwps-0.3-3 lksctp-tools lp-solve
  media-player-info openjdk-7-jre openjdk-7-jre-headless python3-mako
  python3-markupsafe rhythmbox-data totem-common tzdata-java uno-libs3 ure
Use 'apt-get autoremove' to remove them.
Suggested packages:
  cscope vim-doc
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 60 not upgraded.
Need to get 0 B/1,049 kB of archives.
After this operation, 2,569 kB of additional disk space will be used.
Selecting previously unselected package vim-nox.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 163905 files and directories currently installed.)
Preparing to unpack .../vim-nox_2%3a7.4.488-7+deb8u1_amd64.deb ...
Unpacking vim-nox (2:7.4.488-7+deb8u1) ...
Setting up vim-nox (2:7.4.488-7+deb8u1) ...
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/ex (ex) in auto mode

The result of vim --version | grep python

+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
Linking: gcc   -L. -Wl,-z,relro -L/home/pere/src/debian/ruby/ruby2.1/debian/lib 
-fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -fPIE -pie -Wl,-z,relro 
-Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl 
-lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector -L/usr/local/lib  
-L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lcrypt 
-L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil 
-lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu
 -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm    

And the result of uname -a

Linux DM-debian 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
  • 1
    So the pre-packed vim doesn't do what you want. You have essentially 4 choices, persuade the debian packagers to package what you want, find someone else who has already packaged what you want and add their repo to your apt-sources, build it yourself, or live with python2. Why do you want python3? You do know that this is only affecting plugins to vim, not the ability of vim to create python3 code? Which plugin do you want to use? – icarus Nov 28 '16 at 23:03
  • Yes, at first, I thought Debian packaged vim-nox with python3, but apparently not: packages.debian.org/wheezy/vim-nox . Moreover, apt-cache search vim | grep python3 returns nothing. I'll have to rebuild it – Damien Nov 29 '16 at 7:57
  • So I followed this link, now my vim has the support for Python3. xorpd.net/blog/vim_python3_install.html – Damien Nov 29 '16 at 9:10
  • 1
    What is the question? BTW vim-nox on stable still need only python2.7, see: packages.debian.org/jessie/vim-nox – Giacomo Catenazzi Nov 29 '16 at 16:06
  • 1
    @Damien: why rebuild? I think you misinterpreting what it mean python support in vim. vim works fine using internally python2.7. You can code and use python3 from within vim without problems. It is independent. – Giacomo Catenazzi Nov 29 '16 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.