Reputation: 1800
My end goal is to have the YouCompleteMe Pluggin for Vim. As a prerequiste I need my Vim to be configured for python3.
Previous when configuring with python I used the following command
./configure --enable-pythoninterp=yes
From searching it looks like the configure command for python3 is
./configure --enable-python3interp=yes --with-python3-config-dir=????
Unfortunately all the search results shows a pathway of /usr/lib/python3...
No such path exists for me.
I do have python 3, running which python3
results in /usr/bin/python3
How can I find the route to my python3 config dir?
Upvotes: 2
Views: 3670
Reputation: 8898
Looks like you're on Mac OS X. So my recommendation is that you should install a package manager such as Homebrew and use it to install a more featureful Vim on your machine.
After you set up Homebrew, all you need to install Vim with Python3 support is:
$ brew install vim
Since version 1.6.0 of Homebrew (2018-04-09), Vim from Homebrew includes Python3 support by default.
This is much better than building it yourself from source, because using a package manager ensures you're using a build that is tested and well integrated into your platform. You also get a simple upgrade path to keep up to date with latest versions of Vim. By getting easy upgrades you'll also get security fixes, if there are any.
If you're building from source yourself, you're in theory signing up to do all that yourself, but it's hard to do so as well as a project that's dedicated to do so and has been specializing on building software for years.
So here's a strong recommendation to using a package whenever one is available and steering away from building from source as much as possible.
Upvotes: -1
Reputation: 1800
I ended up downloading the latest python which was 3.8, then running which python3
which provided a pathway. Then I used that pathway in this command
./configure --enable-python3interp --with-python3-command=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
Followed by
$ cd src
$ make
$ sudo make install
Over at ycm ~/.vim/bundle/YouCompleteMe
$ ./install.py --js-completer
Upvotes: 2