lundi 5 janvier 2015

How to make macvim recognise framework python in OS X?


By default, the sys.path of python in terminal vim and sys.path of python in macVim is different. In both environment, :python print sys.path in terminal vim returns:



['/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
site-packages/setuptools-5.4.2-py2.7.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Py
thon.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg', '/Library/Py
thon/2.7/site-packages/pip-1.5.6-py2.7.egg', '/usr/local/lib/python2.7/site-packages/setup
tools-5.4.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg', '/us
r/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
plat-darwin', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/l
ib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Vers
ions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.8_2/Fra
meworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7
.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/p
ython/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users
/chong/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packag
es', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python
2.7/site-packages', '/Library/Python/2.7/site-packages', '_vim_path_']


While in macvim, the returned value would be:



['/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg',
'/usr/local/lib/python2.7/site-packages/setuptools-5.4.2-py2.7.egg',
'/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg',
'/Users/chong/Library/Python/2.7/lib/python/site-packages',
'/Library/Python/2.7/site-packages', '/usr/local/lib/python2.7/site-packages',
'_vim_path_', '/Users/chong/.vim/bundle/vim-latex-suite/ftplugin/latex-suite',
'/Users/chong/.vim/bundle/vim-latex-suite/ftplugin/latex-suite']


Basically no path of framework python is included. However, my python version is the framework version came as default with the OS. So is it possible to setup MacVim to include the framework python just like how terminal vim did?





Aucun commentaire:

Enregistrer un commentaire