From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: emacs uses an old version of python Date: Sun, 30 Nov 2008 16:52:01 -0800 (PST) Organization: http://groups.google.com Message-ID: <65eef947-2f45-488b-a1a5-7378cabad56d@i24g2000prf.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1228107679 10792 80.91.229.12 (1 Dec 2008 05:01:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2008 05:01:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 01 06:02:22 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L70v4-0006OZ-HD for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2008 06:02:03 +0100 Original-Received: from localhost ([127.0.0.1]:51179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L70tu-0006Xo-Ic for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Dec 2008 00:00:50 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i24g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1228092721 19915 127.0.0.1 (1 Dec 2008 00:52:01 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 1 Dec 2008 00:52:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i24g2000prf.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:164943 X-Mailman-Approved-At: Mon, 01 Dec 2008 00:00:33 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60273 Archived-At: On Nov 30, 1:51 pm, John Seales 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 probl= em 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 'pytho= nw2.6' into /usr/bin, but still emacs calls the old version. Interestingly,= the terminal application correctly uses the new version of python when I r= un 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 =E2=80=9C.emacs=E2=80=9D. (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 =E2=80=9Ccopy=E2=80=9D, but rather make symlink (aka softlink),= e.g. =E2=80=9Cln - s /usr/local/bin/python2.6 /usr/loca/bin/py=E2=80=9D. In general, programs will look for =E2=80=9Cpython=E2=80=9D, 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 =E2=88=91 http://xahlee.org/ =E2=98=84