Thursday, January 10, 2013

Re: Default PYTHONPATH for vim (Mac OSX 10.8.2 Mountain Lion)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJQ7zDZAAoJEFDgLr75E3sPfREIALAAzUg7fexmXafqrNjJGXCi
UKWnY/5hCOw7Gp41IPOdj0YYx2SHLb3g6Sb7DG61cFqS/xC3H24+oPbEygoyS9Be
t1Cuzmjco1ZVLTn+ipcNxTQn1eLE9sgJiFb5lJsbDQZiJ+C8Dy11wFWR9I1+D+7Y
ITvjKkmwlQYpvMLvabupUbdHoekzhsrco73F6VR5vG1y2ZK6v8nhNmTpD5ipsx4E
r/fCBhIpeaR+RwhdD4V+bxewpCs0NKGoK74IEBtove7JAUi3WT25IW2fsaM1Jr1Z
tWiCeLG9D06Ocm9c1uf+hMkI2SX6Jd0ZJTdv226xlvlFXcizJN//EhvEQFsxvKI=
=JcH6
-----END PGP SIGNATURE-----
On 01/10/2013 08:40 PM, William Broach wrote:

> Hello,
>
> On a fresh install of Mac OSX 10.8.2 Mountain Lion, vim reports its PYTHONPATH as follows:
>
> :python import sys; print(sys.path)
>
> ['/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac',
> '/usr/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/Extras/lib/python', '/usr/lib/python2.7/lib-tk', '/usr/li
> b/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload']
>
> the system-wide "/Library/Python/2.7/site-packages" is not in its PYTHONPATH.
>
> This is causing issues with my vim plugins as they will not run unless I add the following to my vimrc: python import sys; sys.path.append('/Library/Python/2.7/site-packages')
>
> This doesn't seem right, can anyone provide any insight to this?
>
> Thanks
>

I have the same trouble too & I'm still running 10.6.8.

Although my console Vim & Python installation are from MacPorts, I still
had to set PYTHONPATH but I set it in my
bash_profile (it being OS X).

The output on Linux (in this case Fedora 17):

['/home/miracle/.vim/bundle/Python-mode-klen',
'/home/miracle/.vim/bundle/Python-mode-klen/pylibs', '/home/miracle',
'/usr/lib64/python27.zi
p', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2',
'/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/p
ython2.7/lib-dynload',
'/home/miracle/.local/lib/python2.7/site-packages',
'/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-
packages/gst-0.10', '/usr/lib64/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/setu
ptools-0.6c11-py2.7.egg-info',
'/home/miracle/.vim/bundle/vim-django/python']'

is as you would expect so I don't think it's a Vim problem.

Cheers,

Phil...

--
currently (ab)using
CentOS 5.8 & 6.3, Debian Squeeze & Wheezy, Fedora Beefy & Spherical,
Lubuntu 12.10, OS X Snow Leopard & Ubuntu Precise & Quantal

No comments: