Installed python 2.5 over 2.4 and lost installed packages

Discussion in 'Python' started by james@reggieband.com, Apr 27, 2008.

  1. Guest

    Hi all,

    I recently updated os x from python 2.4 to 2.5 (from python.org) and
    in doing so I lost my old python path entries. Python 2.4 was
    installed using fink. Now when I do:

    import sys
    print sys.path

    my old site-packages directory is not within it (the 2.4 one).

    So what is the right thing to do in this situation? It would be a
    pain to find and re-install each of the packages. Is it ok to add my
    old site-packages directory to the sys.path? What is the best way to
    do so (e.g. using .pth files or PYTHONPATH or other)? Is cp'ing the
    files from one place to another safe or advisable?

    Any help on best practices appreciated.

    James.
    , Apr 27, 2008
    #1
    1. Advertising

  2. On Apr 27, 8:15 am, wrote:
    > Hi all,
    >
    > I recently updated os x from python 2.4 to 2.5 (from python.org) and
    > in doing so I lost my old python path entries. Python 2.4 was
    > installed using fink.  Now when I do:
    >
    > import sys
    > print sys.path
    >
    > my old site-packages directory is not within it (the 2.4 one).
    >
    > So what is the right thing to do in this situation?  It would be a
    > pain to find and re-install each of the packages.  Is it ok to add my
    > old site-packages directory to the sys.path?  What is the best way to
    > do so (e.g. using .pth files or PYTHONPATH or other)?  Is cp'ing the
    > files from one place to another safe or advisable?
    >
    > Any help on best practices appreciated.
    >
    > James.


    As long as the Python extensions or packages are pure ones, then
    copying them over shouldn't hurt anything. If you have some that have
    C/C++ links (such as PIL or pywin32), then you'll need to reinstall
    those manually.

    Mike
    Mike Driscoll, Apr 27, 2008
    #2
    1. Advertising

  3. Guest

    On Apr 27, 8:42 pm, Mike Driscoll <> wrote:
    > On Apr 27, 8:15 am, wrote:


    > > I recently updated os x from python 2.4 to 2.5 (from python.org) and
    > > in doing so I lost my old python path entries.


    > > So what is the right thing to do in this situation?
    > > Is cp'ing the files from one place to another safe or advisable?


    > As long as the Python extensions or packages are pure ones, then
    > copying them over shouldn't hurt anything. If you have some that have
    > C/C++ links (such as PIL or pywin32), then you'll need to reinstall
    > those manually.


    I tried that and the C extensions burned me. Syck (for YAML) and
    mercurial (I think ... there were at least 2 problems) posted
    warnings or bailed out with errors. Looks like I will delay until I
    have the time and energy to chase all my dependencies. Perhaps once
    my server (Ubuntu) moves to 2.6 I'll update my Mac at the same time.

    From now on I am storing my install packages somewhere accessible
    instead of deleting them once I'm done with them. I wish I could
    generate a manifest of installed packages to make upgrading easier.

    Cheers,
    James.
    , Apr 28, 2008
    #3
  4. Jason Guest

    On Apr 28, 1:46 pm, wrote:
    > On Apr 27, 8:42 pm, Mike Driscoll <> wrote:
    >
    > > On Apr 27, 8:15 am, wrote:
    > > > I recently updated os x from python 2.4 to 2.5 (from python.org) and
    > > > in doing so I lost my old python path entries.
    > > > So what is the right thing to do in this situation?
    > > > Is cp'ing the files from one place to another safe or advisable?

    > > As long as the Python extensions or packages are pure ones, then
    > > copying them over shouldn't hurt anything. If you have some that have
    > > C/C++ links (such as PIL or pywin32), then you'll need to reinstall
    > > those manually.

    >
    > I tried that and the C extensions burned me. Syck (for YAML) and
    > mercurial (I think ... there were at least 2 problems) posted
    > warnings or bailed out with errors. Looks like I will delay until I
    > have the time and energy to chase all my dependencies. Perhaps once
    > my server (Ubuntu) moves to 2.6 I'll update my Mac at the same time.
    >
    > From now on I am storing my install packages somewhere accessible
    > instead of deleting them once I'm done with them. I wish I could
    > generate a manifest of installed packages to make upgrading easier.
    >
    > Cheers,
    > James.


    If you used Easy Install [1] to install your extra packages, go to
    your site-packages directory. You should find a file called "easy-
    install.pth". All packages that Easy Install provided should be in
    there.

    [1] Found at: http://peak.telecommunity.com/DevCenter/EasyInstall

    --Jason
    Jason, Apr 28, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul  Smith
    Replies:
    0
    Views:
    719
    Paul Smith
    Nov 18, 2003
  2. C Gillespie
    Replies:
    0
    Views:
    296
    C Gillespie
    May 24, 2005
  3. David Lyon
    Replies:
    19
    Views:
    557
    David Lyon
    Apr 24, 2009
  4. Tuomas Vesterinen
    Replies:
    2
    Views:
    1,089
    Tuomas Vesterinen
    May 16, 2010
  5. Ian
    Replies:
    3
    Views:
    158
Loading...

Share This Page