1

The python I want to use is located at C:\randomplace\python.

I have a dev machine that has multiple instances of python (so relying on finding python in$PATH is unreliable).

How do I configure vim to use just the before mentioned for the purpose of vim plugins etc?

1

1 Answer 1

2

Add the following to your vimrc:

set pythonhome=C:\randomplace\python
set pythondll=C:\randomplace\python\python27.dll

For python3 use pythonthreehome and pythonthreedll.

For this to work python dynamic support must be compiled in. The following command must print 1:

:echo has("python_dynamic")

For python3:

:echo has("python3_dynamic")

See :help python-dynamic and help for the named options.

Your Answer

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

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