all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs uses an old version of python
Date: Sun, 30 Nov 2008 16:52:01 -0800 (PST)	[thread overview]
Message-ID: <65eef947-2f45-488b-a1a5-7378cabad56d@i24g2000prf.googlegroups.com> (raw)
In-Reply-To: mailman.1577.1228082753.26697.help-gnu-emacs@gnu.org

On Nov 30, 1:51 pm, John Seales <praxbaf...@hotmail.com> wrote:
> GNU emacs 22.1.1
> on an Intel MacBook
>
> I've updated to Python 2.6, but emacs still is using 2.3. This is a problem because I need to use the newer features of the language. Looking in my /usr/bin/ directory, I see that 'python2.3' and 'pythonw2.3' are in there, along with just plain 'python'. Using sudo, I copied 'python2.6' and 'pythonw2.6' into /usr/bin, but still emacs calls the old version. Interestingly, the terminal application correctly uses the new version of python when I run it from there.
>
> I'm guessing I may need to move more files around and/or change my .emacs file. But how?
>

there are several things you can do.

set your shell path var in “.emacs”.
(setenv "PATH" "/Users/xah/bin:/sw/bin:/sw/sbin:/bin:/usr/local/bin:/
sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/opt/local/bin:/Developer/
Tools")

make your the python you want comes in one of the path above first.

Not sure what emacs you are using. Carbon emacs? Aquamacs emacs?
Emacs.app? you built it? Because gui apps not started from the shell
will not inherent your shell env.

Also not sure what emacs package you are using. The python mode? some
other python interactive shell? In general, a package may search
obvious places and find the first one it think is the right python.

Also, don't “copy”, but rather make symlink (aka softlink), e.g. “ln -
s /usr/local/bin/python2.6 /usr/loca/bin/py”.

In general, programs will look for “python”, not python2.6 or any
specific version. (same with perl, etc.)

also, you should not touch anything inside /usr/bin. If you need a
later version of python, perl, etc, install them in your home dir, or /
usr/local/bin, or use Fink to install (/sw/bin) or MacPorts (opt/
bin).

  Xah
∑ http://xahlee.org/

       reply	other threads:[~2008-12-01  0:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1577.1228082753.26697.help-gnu-emacs@gnu.org>
2008-12-01  0:52 ` Xah Lee [this message]
2008-11-30 21:51 emacs uses an old version of python John Seales
2008-11-30 22:34 ` Peter Dyballa
2008-12-01  6:00 ` Thierry Volpiatto
     [not found] ` <mailman.1595.1228111500.26697.help-gnu-emacs@gnu.org>
2008-12-01  8:26   ` Richard Riley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65eef947-2f45-488b-a1a5-7378cabad56d@i24g2000prf.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.