Loading ...
Sorry, an error occurred while loading the content.

Re: specifying python interpreter for vim7

Expand Messages
  • Chris Fonnesbeck
    ... Interestingly, when I do this something very odd happens. It now cites the 2.4 directory, but continues to look for python 2.3! It looks like something is
    Message 1 of 12 , Apr 5 11:28 AM
    • 0 Attachment
      On 4/5/06, Benji Fisher <benji@...> wrote:
      >
      > On Wed, Apr 05, 2006 at 09:36:27AM -0400, Chris Fonnesbeck wrote:
      > > On 4/5/06, Chris Fonnesbeck <fonnesbeck@...> wrote:
      > > >
      > > > You are right; I may have to play with the python path, but it seems
      > > > strange that 2.3.5 ends up on the sys.path. I dont actually have a
      > > > PYTHONPATH variable defined in my environment at the moment; but
      > python
      > > > 2.4.1 is on my PATH.
      > >
      > > I tried setting the PYTHONHOME variable:
      > >
      > > PYTHONHOME=/Library/Frameworks/Python.framework/Versions/2.4
      > >
      > > (which should do the trick on OSX) then logged out and in again, but the
      > > problem persists.
      >
      > Where did you set the PYTHONHOME variable? If you are starting
      > Vim.app from the Finder (or, I think, if you start it using the open
      > command) then vim does not inherit environment variables from your login
      > shell. You can try calling the executable from a Terminal window,
      >
      > $ /Applications/Vim.app/Contents/MacOS/Vim -g
      >
      > or you can try
      >
      > :let $PYTHONHOME = '/Library/Frameworks/Python.framework/Versions/2.4'


      Interestingly, when I do this something very odd happens. It now cites the
      2.4 directory, but continues to look for python 2.3! It looks like something
      is hard-wired somewhere:

      ['/Users/chris/Downloads',
      '/Library/Frameworks/Python.framework/Versions/2.4/lib/python23.zip',
      '/Library/Frameworks/Python.
      framework/Versions/2.4/lib/python2.3/',
      '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.3/plat-darwin',
      '/Libr
      ary/Frameworks/Python.framework/Versions/2.4/lib/python2.3/plat-mac',
      '/Library/Frameworks/Python.framework/Versions/2.4/lib/
      python2.3/plat-mac/lib-scriptpackages',
      '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.3/lib-tk',
      '/Library/F
      rameworks/Python.framework/Versions/2.4/lib/python2.3/lib-dynload']




      --
      Chris Fonnesbeck + Atlanta, GA + http://trichech.us
    • Benji Fisher
      ... [snip] ... Perhaps the problem is that the linking option is simply -framework Python . The compilation flags specify python2.4. See the comments in
      Message 2 of 12 , Apr 7 5:37 AM
      • 0 Attachment
        On Wed, Apr 05, 2006 at 09:22:06AM -0400, Chris Fonnesbeck wrote:
        >
        > VIM - Vi IMproved 7.0c08 BETA (2006 Apr 3, compiled Apr 5 2006 09:13:29)
        > MacOS X (unix) version
        > Compiled by chris@...
        > Big version with Carbon GUI. Features included (+) or not (-):
        [snip]
        > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MAC -fno-common
        > -fpascal-strings -Wall -Wno-unknown-pragmas -mdyna
        > mic-no-pic -pipe -I. -Iproto -DMACOS_X_UNIX -no-cpp-precomp
        > -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon -
        > O -fno-strength-reduce -Wall -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch
        > i386 -arch ppc -I/Library/Frameworks/Python.
        > framework/Versions/2.4/include/python2.4
        > Linking: gcc -L/usr/local/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk
        > -arch i386 -arch ppc -o Vim -framework Carbon
        > -lncurses -liconv -framework Python
        >
        > You are right; I may have to play with the python path, but it seems strange
        > that 2.3.5 ends up on the sys.path. I dont actually have a PYTHONPATH
        > variable defined in my environment at the moment; but python 2.4.1 is on my
        > PATH.

        Perhaps the problem is that the linking option is simply
        "-framework Python". The compilation flags specify python2.4.

        See the comments in src/Makefile , starting with

        # - If you do not trust the automatic configuration code, then inspect
        # auto/config.h and auto/config.mk, before starting the actual build
        # phase. If possible edit this Makefile, rather than auto/config.mk --
        # especially look at the definition of VIMLOC below. Note that the
        # configure phase overwrites auto/config.mk and auto/config.h again.

        You can probably get it to link with the right version of python by
        hacking one of the auto/config.* files or src/Makefile (setting LDFLAGS
        somewhere).

        I suppose the most direct method is to run "gcc -L/usr/local/lib
        -isysroot ..." from the shell.

        If this works, please let us know. Someone (probably Bram) can
        probably fix the autoconf/Makefile stuff so that it does not require a
        hack.

        If you manage to link with the correct version of python and still
        have problems, this may be more of a python problem than a Mac problem.
        You might get more help from the general vim users' list (vim@...)
        than this one. I will be off-line from later today until Monday.

        HTH --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.