473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

new to mac OS10

I'm on a mac OS X (10.3.8), and I seem to have accidentally destroyed
the default python installation. How should I put it on? Do I need to
use the unix version? any help would be greatly appreciated.

THN
Jul 19 '05 #1
11 1360
Thomas Nelson wrote:
I'm on a mac OS X (10.3.8), and I seem to have accidentally destroyed
the default python installation. How should I put it on? Do I need to
use the unix version? any help would be greatly appreciated.

THN


Hi Thomas,

I'm using OSX 10.3.8 as well. Just wondering, how did you "destroy" it?
What I am thinking is, it may not be as destroyed as you think it might
have...

cheers
maurice
Jul 19 '05 #2
Maurice LING wrote:

I'm using OSX 10.3.8 as well. Just wondering, how did you "destroy" it?
What I am thinking is, it may not be as destroyed as you think it might
have...

cheers
maurice


I was actually trying to update to the newest python version, and I had
read something saying it would conflict with the old version, so I went
through and deleted all the folders that had "python" in the name =].
clever of me, huh? now I can't make either the new or the old work.
Once again, any help would be terrific.

THN
Jul 19 '05 #3

I was actually trying to update to the newest python version, and I had
read something saying it would conflict with the old version, so I went
through and deleted all the folders that had "python" in the name =].
clever of me, huh? now I can't make either the new or the old work.
Once again, any help would be terrific.

THN


Ok... I am going to assume a few things and will need you to check a few
things... please tell me if my assumptions are wrong...

assumption 1: you are afraid of "python overload' in Mac because you
want the latest version of Python but Apple doesn't seems to maintain
the upgrade of the Apple-installed Python.

assumption 2: you are installing the latest version of Python through Fink.

I need you to check the following things and tell me the results:

1. go to /usr/bin and do a "ls -all python*"

2. check for presence of /System/Library/Framework/Python.framework

3. do a "which python"

4. do a "which pythonw"

5. execute "python"

6. execute "pythonw"

i need to assess the damage done :P

Cheers
Maurice

Jul 19 '05 #4
If you simply want the latest python to run from the command line, then
compiling the source code works fine on the mac. I just installed
2.4.1 on Os 10.3.8 last week without any problems.

http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz

"./configure"
"make"
"make install"

J.S.

Jul 19 '05 #5
The main thing I would like is to be able to use tkinter with python on
my mac. will the command-line-style source allow this? Does it come
with IDLE? How is the fink version different from the source i can
download at python.org? Here's the result of the requested commands on
my Terminal. It would appear that these links are broken, as
Python.framework no longer exists. Sorry to be so much trouble,

THN

Welcome to Darwin!
~ $ ls -all /usr/bin/python*
lrwxr-xr-x 1 root wheel 9 20 Jun 2004 /usr/bin/python -> python2.3
lrwxr-xr-x 1 root wheel 72 20 Jun 2004 /usr/bin/python2.3 ->
.../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
lrwxr-xr-x 1 root wheel 10 20 Jun 2004 /usr/bin/pythonw -> pythonw2.3
-rwxr-xr-x 1 root wheel 122 8 Jun 2003 /usr/bin/pythonw2.3
~ $ ls /System/Library/Framework/Python.framework
ls: /System/Library/Framework/Python.framework: No such file or directory
~ $ cd /System/Library/Framework/Python.framwork
-bash: cd: /System/Library/Framework/Python.framwork: No such file or
directory
~ $
Jorl Shefner wrote:
If you simply want the latest python to run from the command line, then
compiling the source code works fine on the mac. I just installed
2.4.1 on Os 10.3.8 last week without any problems.

http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz

"./configure"
"make"
"make install"

J.S.

Jul 19 '05 #6
Thomas Nelson wrote:
The main thing I would like is to be able to use tkinter with python on
my mac. will the command-line-style source allow this? Does it come
with IDLE?
No. You need a framework version, which can be built from source, but
it's best to leave that to people who know what they're doing. ;-)

http://python.org/ftp/python/2.4.1/M...SX-2.4.1-1.dmg

As for restoring Python 2.3.0, see below before going further. You may
have to reinstall the OS or parts of it. Or you might also be able to
snag the directories from another suitable OS X installation using the
appropriate tools.

And next time, *don't delete system files*!
How is the fink version different from the source i can
download at python.org? Here's the result of the requested commands on
my Terminal. It would appear that these links are broken, as
Python.framework no longer exists. Sorry to be so much trouble,

THN

Welcome to Darwin!
~ $ ls -all /usr/bin/python*
lrwxr-xr-x 1 root wheel 9 20 Jun 2004 /usr/bin/python -> python2.3
lrwxr-xr-x 1 root wheel 72 20 Jun 2004 /usr/bin/python2.3 ->
../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
lrwxr-xr-x 1 root wheel 10 20 Jun 2004 /usr/bin/pythonw -> pythonw2.3
-rwxr-xr-x 1 root wheel 122 8 Jun 2003 /usr/bin/pythonw2.3
~ $ ls /System/Library/Framework/Python.framework
ls: /System/Library/Framework/Python.framework: No such file or directory
~ $ cd /System/Library/Framework/Python.framwork
-bash: cd: /System/Library/Framework/Python.framwork: No such file or
directory
~ $


You misspelt the framework path in both cases.

Blasphemy:~ kern$ ls /System/Library/Frameworks/Python.framework/
Headers Python Resources Versions

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #7
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It's *not* a good idea to delete Apple's system Python. You will
probably need to reinstall the OS.

In addition to the mailing list that someone else posted (which is a
great resource!), here's a good site to check out:

http://pythonmac.org/

The site maintainer, Bob Ippolito, is one of the main developers of
Python on the Mac and maintains a lot of packages. This site also
includes lots of links to information.

Hope that helps,
Kevin

Thomas Nelson wrote:
| The main thing I would like is to be able to use tkinter with python on
| my mac. will the command-line-style source allow this? Does it come
| with IDLE? How is the fink version different from the source i can
| download at python.org? Here's the result of the requested commands on
| my Terminal. It would appear that these links are broken, as
| Python.framework no longer exists. Sorry to be so much trouble,
|
| THN
|
|
|
| Welcome to Darwin!
| ~ $ ls -all /usr/bin/python*
| lrwxr-xr-x 1 root wheel 9 20 Jun 2004 /usr/bin/python -> python2.3
| lrwxr-xr-x 1 root wheel 72 20 Jun 2004 /usr/bin/python2.3 ->
| ../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
| lrwxr-xr-x 1 root wheel 10 20 Jun 2004 /usr/bin/pythonw -> pythonw2.3
| -rwxr-xr-x 1 root wheel 122 8 Jun 2003 /usr/bin/pythonw2.3
| ~ $ ls /System/Library/Framework/Python.framework
| ls: /System/Library/Framework/Python.framework: No such file or directory
| ~ $ cd /System/Library/Framework/Python.framwork
| -bash: cd: /System/Library/Framework/Python.framwork: No such file or
| directory
| ~ $
|
|
| Jorl Shefner wrote:
|
|> If you simply want the latest python to run from the command line, then
|> compiling the source code works fine on the mac. I just installed
|> 2.4.1 on Os 10.3.8 last week without any problems.
|>
|> http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz
|>
|> "./configure"
|> "make"
|> "make install"
|>
|> J.S.
|>
- --
Cheers,

Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:sw@wordtech-software.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCYVSkJmdQs+6YVcoRAj2IAJ4/Pv0yJhs4flLOk1JgEHcUbNrJPwCeMeS9
ue7gNcVE8Kluw7LplS1bFGs=
=uqOO
-----END PGP SIGNATURE-----
Jul 19 '05 #8
Hi Thomas,

It seems that you've cleanly killed the Apple-installed Python, which
isn't too bad a thing after all. What I can suggest you do is this...
Copy the entire /System/Library/Frameworks/Python.framework directory
from someone and drop it into your system (same place of course). I will
not suggest installing Python 2.4.1 until the Apple-installed Python is
sorted out. My reasons being,

1. I have no idea what Mac OSX uses Python for. Although symlink may get
you through most of the time but I cannot be sure that none of OSX's
stuffs are hardcoded to use the Python in
/System/Library/Frameworks/Python.framework.

2. Installing another Python may or may not be a precise remedy. It may
just worsen things and I won't want to bet on that.

3. Apple-installed Python's command line tools are symlinked from
/usr/bin to /System/Library/Frameworks/Python.framework but the OSX
installer for Python 2.4.1 places the commandline tools in
/usr/local/bin and symlinked to /Library/Frameworks/Python.framework. So
it seems to me that Python 2.4.1 (installed using OSX installer for
Python 2.4.1) is not a precise replacement of Apple-installed Python...

For me, my setup is this

ls -all /usr/bin/python*
lrwxr-xr-x 1 root wheel 14 4 Apr 08:40 /usr/bin/python ->
/sw/bin/python
lrwxr-xr-x 1 root wheel 72 1 Apr 1976 /usr/bin/python2.3 ->
.../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
lrwxr-xr-x 1 root wheel 10 1 Apr 1976 /usr/bin/pythonw -> pythonw2.3
-rwxr-xr-x 1 root wheel 122 9 Jun 2003 /usr/bin/pythonw2.3

/usr/bin/pythonw2.3 and /usr/bin/python2.3 points to the same thing,
/System/Library/Frameworks/Python.framework/Versions/2.3/bin/python. And
I have Fink's Python in /sw/bin/python.

So now, for me, if I need to use the Apple-installed Python, my command
line is "pythonw" while "python" gives me Fink's Python as shown below:

~ mauriceling$ pythonw
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import sys
sys.path ['',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages']

~ mauriceling$ python
Python 2.3.5 (#1, Apr 6 2005, 13:01:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin
Type "help", "copyright", "credits" or "license" for more information. import sys
sys.path ['', '/sw/lib/python23.zip', '/sw/lib/python2.3',
'/sw/lib/python2.3/plat-darwin', '/sw/lib/python2.3/plat-mac',
'/sw/lib/python2.3/plat-mac/lib-scriptpackages',
'/sw/lib/python2.3/lib-tk', '/sw/lib/python2.3/lib-dynload',
'/sw/lib/python2.3/site-packages',
'/sw/lib/python2.3/site-packages/Numeric',
'/sw/lib/python2.3/site-packages/libsbml',
'/sw/lib/python2.3/site-packages/gtk-2.0']


There is no problem with having multiple versions and copies of Pythons
in your system. The problems are:

1. get all the symlinks correct
2. know when to use what and how to use
3. means that you may have to install the same 3rd party library x-times
for x-numbers of Pythons you might have... quite a pain...

Cheers
Maurice
Jul 19 '05 #9
Maurice LING wrote:
Hi Thomas,

It seems that you've cleanly killed the Apple-installed Python, which
isn't too bad a thing after all. What I can suggest you do is this...
Copy the entire /System/Library/Frameworks/Python.framework directory
from someone and drop it into your system (same place of course). I will
not suggest installing Python 2.4.1 until the Apple-installed Python is
sorted out. My reasons being,

1. I have no idea what Mac OSX uses Python for. Although symlink may get
you through most of the time but I cannot be sure that none of OSX's
stuffs are hardcoded to use the Python in
/System/Library/Frameworks/Python.framework.
I believe Apple only uses it for their fax utilities. There's also the
CoreGraphics wrapper (which the fax stuff uses), but that's pretty
useless as it is.
2. Installing another Python may or may not be a precise remedy. It may
just worsen things and I won't want to bet on that.
The 2.4.1 build by Bob Ippolito is designed to work alongside the
system-installed Python. It certainly won't replace it, but it shouldn't
worsen anything.
3. Apple-installed Python's command line tools are symlinked from
/usr/bin to /System/Library/Frameworks/Python.framework but the OSX
installer for Python 2.4.1 places the commandline tools in
/usr/local/bin and symlinked to /Library/Frameworks/Python.framework. So
it seems to me that Python 2.4.1 (installed using OSX installer for
Python 2.4.1) is not a precise replacement of Apple-installed Python...


Bingo. It's not intended to be one.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #10
Robert Kern wrote:
3. Apple-installed Python's command line tools are symlinked from
/usr/bin to /System/Library/Frameworks/Python.framework but the OSX
installer for Python 2.4.1 places the commandline tools in
/usr/local/bin and symlinked to /Library/Frameworks/Python.framework.
So it seems to me that Python 2.4.1 (installed using OSX installer for
Python 2.4.1) is not a precise replacement of Apple-installed Python...

Bingo. It's not intended to be one.


Hi Robert,

Once I've tried to install Python 2.4.1 through the installer Bob
Ippolito built. I've already for Fink installed Python 2.3.5 in my
system. So,

/usr/bin/python -> /sw/bin/python

and the newly installed Python 2.4.1 created /usr/local/bin/python ->
/Library/Frameworks/Python.framework/python

Does /usr/bin/python takes precedence over /usr/local/bin/python?

Somehow it rings an alarm in me...

Cheers
Maurice
Jul 19 '05 #11
Maurice LING wrote:
Robert Kern wrote:
3. Apple-installed Python's command line tools are symlinked from
/usr/bin to /System/Library/Frameworks/Python.framework but the OSX
installer for Python 2.4.1 places the commandline tools in
/usr/local/bin and symlinked to /Library/Frameworks/Python.framework.
So it seems to me that Python 2.4.1 (installed using OSX installer
for Python 2.4.1) is not a precise replacement of Apple-installed
Python...
Bingo. It's not intended to be one.


Hi Robert,

Once I've tried to install Python 2.4.1 through the installer Bob
Ippolito built. I've already for Fink installed Python 2.3.5 in my
system. So,

/usr/bin/python -> /sw/bin/python


Don't do that. Leave /usr alone! (/usr/local excepted)

Change your PATH environment variable if you want a different Python to
start up when you type

$ python
and the newly installed Python 2.4.1 created /usr/local/bin/python ->
/Library/Frameworks/Python.framework/python

Does /usr/bin/python takes precedence over /usr/local/bin/python?

Somehow it rings an alarm in me...


That depends on your PATH environment variable, and that only affects
the command line in a terminal shell.

Anything that looks for /usr/bin/python should find the link to the
system Python. Anything that just asks for "whatever python comes first
in your PATH" is customizable via the order of directories in your PATH.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul Lamonby | last post by:
Hi, I am using Mac os10.3.3, running Apache and PHP 4.3.6 I am just starting to use my local Sites folder to test php for my sites, but I cannot seem to get move_uploaded_file() or copy() to...
7
by: has | last post by:
<BLUSH> Careless talk costs lives, as they say. In my case, a throwaway comment that Python could trounce the notoriously underpowered and undersupported AppleScript language for "serious number...
2
by: Eric | last post by:
I'm looking for infomation about registering an application in Windows. I have a client program and a server program. If the user opens the client first and there is no server to connect to I want...
5
by: Huang.Antony | last post by:
HI, when I try the following code, I get a compile error with gcc3.3 under mac OS. int fill; struct emp{ int f; }; #include <vector>
7
yoda
by: yoda | last post by:
the question is do any of you know apple scripts because i'm having trouble with apple scripts on my Apple.
4
by: Tassie | last post by:
I have put javascript menus on some of the navigation buttons on my website - they are supposed to load on mouseover. Before I uploaded the site, they appeared to work. On all of the navigation...
0
by: mikewin | last post by:
Any help would be appreaciated: I'm trying to import a FCP XML project. I'm asked to choose a Translation document file. What is this? Where do I find it. FCP help makes no reference to such a...
0
by: Chris Rebert | last post by:
Same as on all the other platforms. 1. Open IDLE 2. Go Options -Configure IDLE... 3. Choose the Fonts/Tabs section 4. Use the Size pulldown box - Chris On Tue, Sep 2, 2008 at 6:26 AM,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.