I'm a bit of a noob when it comes to Linux, only started using it recently.

However, I am trying to compile vim with python because I am using latex live preview and it needs a python compiled vim to work. I am following these steps here: https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

At part 3 it says to find your config for your python version such as /usr/lib/python3.6/config I dont have that, I only have this: _sysconfigdata_m_linux_x86_64-linux-gnu.py

Am I supposed to make a config directory, or should it already be there?

  • 2
    Which version of Ubuntu? 16.04 onwards has Vim with Python support in the repositories, and for older versions, you have PPAs. There's no need to manually build it.
    – muru
    Nov 17, 2017 at 2:32
  • --with-python3-config-dir, it tells you tight there in the link you posted xD Nov 17, 2017 at 7:06
  • 1
    Any updates on this? I've been looking everywhere, I'm unable to locate the config file and thus compile with python3 support.
    – lando2319
    Apr 4, 2020 at 2:48

2 Answers 2


Although not pretty sure, I guess you are on a x64 platform. The corresponding path is under /usr/lib64/pythonXX.

  • I found it via: find /usr -type d -name config
    – Goblinhack
    Jul 25, 2018 at 17:12

I struggled with this for a while. My goal was to install VIM with python3 support in a Debian Buster docker container.

Try this:

  1. apt install -y vim-gtk python-pip python3-pip vim-common vim-gtk vim-gui-common vim-runtime gcc libc-dev make gettext ncurses-dev acl-dev
  2. cd ~
  3. git clone https://github.com/vim/vim.git
  4. cd vim/src
  5. make distclean # if you build Vim before
  6. ./configure --with-features=huge --enable-python3interp --enable-pythoninterp
  7. make && make install
  8. vim --version #verify python and python3 have +

I had to play around with a few commands to uninstall vim when I was attempting this. You might find these helpful if you need to completely uninstall vim.

  1. apt purge vim
  2. whereis vim
  3. sudo rm <result-path-of-previous-command>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.