0

I have the following Python version callable like this from default shell outside VIM:

[pdubois@mymachine]$ which python
alias python='python2.7'
    /usr/bin/python2.7
[pdubois@mymachine]$ python
Python 2.7.6 (default, Nov 11 2013, 13:13:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

However calling it from within VIM shell, I get the different version

:!python
Python 2.6.2 (r262:71600, Jan 28 2011, 13:47:39)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

:!which python
/opt/otherpath/bin/python

How can I make VIM shell use the Python version like the default shell?

pdubois
  • 7,640
  • 21
  • 70
  • 99
  • 3
    [here](http://stackoverflow.com/questions/4642822/commands-executed-from-vim-are-not-recognizing-bash-command-aliases) may be some helpful information. – fiveclubs May 28 '14 at 01:39
  • Vim usually doesn't see your aliases. Can you compare the values of `$PATH` in and outside of Vim? And tell us what's the value of `'shell'` and `'shellcmdflag'` in Vim? – romainl May 28 '14 at 07:26

0 Answers0