[Pythonmac-SIG] Using fink 2.2's site-packages in MacPython
Jack Jansen
Jack.Jansen@oratrix.com
Fri, 4 Apr 2003 00:15:40 +0200
On donderdag, apr 3, 2003, at 14:02 Europe/Amsterdam, Lance Boyle wrote:
> I have Python 2.2.2 working as both the "Apple" installation and the
> fink installation. Included in these are packages Numeric, Scientific,
> and scipy.
>
> Now, I want to get happy using MacPython 2.2.2. I want to make the
> fink site-packages directory work with MacPython, so I use
> EditPythonPrefs and add a few lines to the list of search paths
> (/sw/lib/bla_bla_bla--see below).
Michael and Ryan already answered most of the points (i.e. MacPython
2.2.X lives in a completely different universe than unix-Python 2.2.X
or MacPython-2.3a2; why would you want to use MacPython 2.2.X
on OSX), but there's one thing that I can't stress enough:
You cannot take extension packages built for one version of Python
and use them in another.
When trying to import fink-Python 2.2.2 modules into MacPython 2.2.2
things fail in a benign
way: it simply doesn't work. With other combinations things may appear
to work, or
even work partially, but you are living dangerously.
There are combinations that are safe (for instance, unless either Apple
or the fink people
did something silly it is probably safe to use packages built for
Apple's Python 2.2 in
fink Python 2.2.2), but you really shouldn't do this unless you know
what you are doing.
And, in case you wonder why this potential problem hasn't been solved
long ago: it has only
really started mattering since MacOSX. Before that, Unix users almost
invariably built their
packages from source and for Mac and Windows there was really only one
distribution. For MacOSX
we suddenly have 4 things called Python, plus a user community that
often prefers downloading
pre-built things over building from source.
As of 2.3 I hope we can get back to 2 Pythons for MacOSX: Apple's
/usr/bin/python 2.2 and
MacPython 2.3. Even if the fink crew decide to continue distributing a
non-framework python 2.3
I hope to have the hooks in place that at least those two 2.3 Pythons
will recognize
each others' extension modules and complain.
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -