[SciPy-user] OS X install success! + Question
Wed Jul 30 09:17:08 CDT 2008
Thanks so much. I installed a new version of easy_install, as
suggested, that installed nose, and now everything works great. All
numpy tests and almost all scipy tests passed. (Nearly) Flawless
I really appreciate the description of what's going on with the OS X
python directories. You've explained it very well.
On Jul 30, 2008, at 7:57 AM, Zachary Pincus wrote:
> Hi Robert,
> I'm sure others with a little deeper knowledge of easy_install and
> friends may chime in, but this should get you started.
>> Before installing NumPy & SciPy I installed the OS X Python from
>> python.org. That's 2.5.2 (laptop shipped with 2.5.1) and was
>> installed in
>> which is just a link to
>> numpy and scipy installed in /Library/Frameworks/Python.framework/
>> So far so good. But, when I used easy_install for nose, that got
>> installed into
>> What is the best way to deal with the Frameworks vs no Frameworks
>> thing? Should I just put a link from /Library/Python/2.5 to /
> Short answer: the version of easy_install on your machine is for the
> version of python that came with the operating system. So
> "easy_install nose" installed nose for that version -- not for the
> python.org python that you just installed.
> You will need to install easy_install for the new version of python
> that you just installed from python.org:
> Then run that version of easy_install that gets installed by the
> ez_setup script. That version, for better or worse, lives by default
> (I would recommend making a symlink to /usr/local/bin for ease.
> Alternately, you could run the easy_setup.py script with the --script-
> dir=/usr/local/bin option.)
> Background information:
> Apple ships a version of Python with OS X, and some housekeeping
> scripts, etc., depend on this python and in some cases, the specific
> (old or broken) versions of some of the libraries it comes with (e.g.
> numpy). This is installed in:
> This version of python is accessible as /usr/bin/python, which is a
> symlink to
> The basic consensus is that one really shouldn't be mucking with this
> python, so the best bet is to install the python.org python, which
> goes into /Library and /usr/local/bin.
> Now, what's the deal with /Library/Python/2.5/site-packages? Well,
> Apple's basic decree is that you must not alter things in /System/...
> directories. But installing a new library for the system python would
> do just that, under the default regime (which would put them in
> site-packages )
> So Apple's python instead puts new libraries in /Library/Python/2.5/
> site-packages .
> This is all fine, and controlled by the default values of the sys.path
> variable (which is the list of directories Python searches when you
> try to import something). It's illuminating to do:
> import sys; print sys.path
> in both the system and python.org versions of python.
> Now, how does one deal with multiple versions of python when
> installing things? In the pre-easy_install era, it was quite simple.
> Python things are installed with setup.py files in a directory:
> python setup.py install
> would install whatever library for the version of python that was used
> to run the script. So /usr/bin/python setup.py install would install
> the library for the system python, and /usr/local/bin/python setup.py
> install would do so for the python.org version. (Plain 'python' is
> the /usr/local/bin version, thanks to the python.org installer.
> With easy_install, this sort of transparency is a bit lost. You need
> to look to see which version of python is invoked in the first line of
> that script to determine where the files will eventually go. If you
> have two versions of python, you need two versions of easy_install in
> different places. I personally find this a bit frustrating...
> SciPy-user mailing list
More information about the SciPy-user