By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

Installing Python 3000

P: n/a
Sorry about the simple question ...

I'd like to install Python 3000 on my computers (Mac, and possibly
Windows), without messing up the existing versions. So far, I've
always relied on using ".msi" on Windows and ".dmg" on the Mac.

From the Python site, I read (different version, but still...):
----
Unpack the archive with tar -zxvf Python-2.4.4.tgz ... Change to the
Python-2.4.4 directory and run the "./configure", "make", "make
install" commands to compile and install Python.
----
The step that gets me worried is the "make install" one... I don't
want it to take over as default. I would like to be able to invoke it
by typing "python3k ..." from anywhere and have it work - while still
having "python" invoke the default 2.5 version.

André
Nov 26 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
André wrote:
The step that gets me worried is the "make install" one... I don't want it
to take over as default. I would like to be able to invoke it by typing
"python3k ..." from anywhere and have it work - while still having
"python" invoke the default 2.5 version.
You want

make altinstall

Peter
Nov 26 '07 #2

P: n/a
I'd like to install Python 3000 on my computers (Mac, and possibly
Windows), without messing up the existing versions. So far, I've
always relied on using ".msi" on Windows and ".dmg" on the Mac.

From the Python site, I read (different version, but still...):
----
Unpack the archive with tar -zxvf Python-2.4.4.tgz ... Change to the
Python-2.4.4 directory and run the "./configure", "make", "make
install" commands to compile and install Python.
----
The step that gets me worried is the "make install" one... I don't
want it to take over as default. I would like to be able to invoke it
by typing "python3k ..." from anywhere and have it work - while still
having "python" invoke the default 2.5 version.
I recommend that you then do use the prebuilt binaries, at least
where available, i.e.

http://www.python.org/download/releases/3.0/

For OSX, I recommend to use a different --prefix for installing,
e.g. /usr/local/py3k. All files then go into that directory, and
nothing else lives in it. To invoke it, you give
/usr/local/py3k/bin/python; if you want to make a python3k link someone
in your path - that would be your choice.

HTH,
Martin
Nov 26 '07 #3

P: n/a
On Nov 26, 6:18 pm, "Martin v. Löwis" <mar...@v.loewis.dewrote:
I'd like to install Python 3000 on my computers (Mac, and possibly
Windows), without messing up the existing versions. So far, I've
always relied on using ".msi" on Windows and ".dmg" on the Mac.
From the Python site, I read (different version, but still...):
----
Unpack the archive with tar -zxvf Python-2.4.4.tgz ... Change to the
Python-2.4.4 directory and run the "./configure", "make", "make
install" commands to compile and install Python.
----
The step that gets me worried is the "make install" one... I don't
want it to take over as default. I would like to be able to invoke it
by typing "python3k ..." from anywhere and have it work - while still
having "python" invoke the default 2.5 version.

I recommend that you then do use the prebuilt binaries, at least
where available, i.e.

http://www.python.org/download/releases/3.0/

For OSX, I recommend to use a different --prefix for installing,
e.g. /usr/local/py3k. All files then go into that directory, and
nothing else lives in it. To invoke it, you give
/usr/local/py3k/bin/python; if you want to make a python3k link someone
in your path - that would be your choice.
I tried this but, unfortunately, the "configure" command fails.
Here's what appears to be the relevant info from config.log:
=======================
configure: failed program was:
| /* confdefs.h. */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_SOURCE 1
| #define _BSD_TYPES 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2647: error: C compiler cannot create executables
See `config.log' for more details.
============================
This is on a Macbook with Leopard installed.

I tried compiling a simple c program (hello world), something that I
have not done in *years* and it failed. It appears as though gcc has
a problem :-(

I can create an object file (via gcc -c hello.c) but not an
executable...

====
andre-roberges-computer:Downloads andre$ gcc -o hello hello.c
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../
libSystem.dylib unknown flags (type) of section 6
(__TEXT,__dof_plockstat) in load command 0
collect2: ld returned 1 exit status
======
Any help would be appreciated!

André

HTH,
Martin
Nov 27 '07 #4

P: n/a
[huge snip]
============================
This is on a Macbook with Leopard installed.

I tried compiling a simple c program (hello world), something that I
have not done in *years* and it failed. It appears as though gcc has
a problem :-(

I can create an object file (via gcc -c hello.c) but not an
executable...
Never mind ... after searching on the Apple forums, I found out that I
needed to reinstall some developers tools from the Leopard dvd. I'll
post the result (success/failure) later...

André

Nov 27 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.