Martin Costabel wrote:

Maurice Ling wrote:

Hi,

I'm running OSX 10.3, which had python originally installed. However, during one of my installations from fink, python is installed, which means I have 2 copies of python on my system. When I type "python" in the terminal, the fink's python came up.

[]

However, since there is the apple's python in my system as well, when I clicked on a .py file, it may or may not work, as all my 3rd party python framework installations goes into fink's python.


Usually, Apple's python and Fink's python (even two versions of the latter) can live together peacefully. They are not integrated, however, each one has their own separate site-packages (in the case of Apple's python, installed by MacPython, for example, in /Library/Python/2.3)

From the command line you can control quite well which python you will use, just choose the right command name.

If you want double-clicking on *.py files to open them with /sw/bin/python2.3, you can do the following:
.
1. Do Cmd-I on a *.py file in the Finder and make sure that "Open with" is set to PythonLauncher. If not, set this so that it is set for all files of this type.


2. Run PythonLauncher.app (it is in /System/Library/Frameworks/Python.framework/Versions/2.3/Resources/, easiest way to start it is from the command line "open -a PythonLauncher"). Open its Preferences and change the Interpreter entry to /sw/bin/python2.3.
[]


'/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages'] My problem is that these directories are no longer in existence since I've deleted them in the process of uninstalling MacPython.


Uninstalling PacPython should not have removed anything inside /System/Library. If it did, it is a bug of the MacPython package. It should restrict itself to the publicly accessible /Library/Python directory. If uninstalling this removed essential parts of the Python framework, you should reinstall the BSD.pkg

In short, my question is, how can I dump away with apple python and use fink python totally?


In short, don't dump it, but make sure it does what you want.

I think I can handle 2 pythons in my system. Possibly my problem may be the fact that macpython and fink python maintains different sets of site-packages, as you've said. Now it seems that all my 3rd party library installations gets into the fink python maintained set of site-packages while half of the time, I need it from macpython. Is there any known way to synchronize these 2 sets of site-packages?

My current way is to a sys.path.append every time I use macpython so that my installed packages are recognized. I am also using jython. Although this is a complete different story, there is a registry file in jython that I can enter extra paths so that I do not have to do sys.path.append every time. Although this is the wrong place to ask this but is there a similar mechanism in fink python and macpython? I will appreciate any help. Because I think the simplest way out is to have a way so that both pythons will search the same (somewhat duplicated as well) set of libraries.

Thank you.

Cheers
Maurice

--
Maurice Han Tong LING, BSc(Hons)(MCB), AdvDipComp, SN
Doctor of Philosophy (Science) Candidate, The University of Melbourne
mobile: +61 4 22781753
        +65 96669233
mailing address: Department of Zoology, The University of Melbourne
                 Royal Parade, Parkville, Victoria 3010, Australia
residential address: 9/41 Dover Street
                     Flemington, Victoria 3031, Australia
email: [EMAIL PROTECTED]
resume: http://maurice.vodien.com/maurice_resume.pdf
www: http://www.geocities.com/beldin79/

The information contained in this message, including its attachment(s), is CONFIDENTIAL and solely intended to its addressee(s) only. The content of this message, including its attachment(s), may be subjected to copyright and privacy laws. If you have received this email in error, please let me know by returning this email, and then destroy all copies.

"I cannot discover anyone knows enough to say definitely what is and what is not possible" -Henry Ford
"The difference between the impossible and the possible lies in a person's determination" -Tommy Charles Lasorda


begin:vcard
fn:Maurice Ling
n:Ling;Maurice
org:The University of Melbourne;Department of Zoology
adr:;;Gate 12, Genetics Lane;Parkville;Victoria;3010;Australia
email;internet:[EMAIL PROTECTED]
title:Probatory Ph.D. Candidate
tel;cell:+61 4 22781753
x-mozilla-html:FALSE
url:http://www.geocities.com/beldin79/
version:2.1
end:vcard

Reply via email to