473,386 Members | 1,810 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,386 software developers and data experts.

Installed python 2.5 over 2.4 and lost installed packages

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.
Jun 27 '08 #1
3 1308
On Apr 27, 8:15*am, ja...@reggieband.com 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
Jun 27 '08 #2
On Apr 27, 8:42 pm, Mike Driscoll <kyoso...@gmail.comwrote:
On Apr 27, 8:15 am, ja...@reggieband.com 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.
Jun 27 '08 #3
On Apr 28, 1:46 pm, ja...@reggieband.com wrote:
On Apr 27, 8:42 pm, Mike Driscoll <kyoso...@gmail.comwrote:
On Apr 27, 8:15 am, ja...@reggieband.com 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
Jun 27 '08 #4

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

Similar topics

1
by: Peter Nikolaidis | last post by:
Greetings, I am attempting to get MySQLdb 0.9.2 installed on Mac OS 10.2 with a Fink distribution of Python 2.2.2. I have seen only a few posts on the subject, some of them relate to...
3
by: anuradha.k.r | last post by:
hi, Have a problem in python installation.I have already installed python 2.2 in my linux machine,but i guess tkinter packages were not selected then.Now i want to use tkinter as an interface for...
8
by: flupke | last post by:
Hi, i'm trying to get boa constructor working with Python 2.3.4 At first i tried with boa 0.2.3 but that gave me an error. After searching the web, it appeared that it's best to work with the...
1
by: Askari | last post by:
Hi, I have this error when I want snashot of my screen with : Traceback (most recent call last): File "C:\Documents and Settings\Assembleur_MAN\Bureau\CasseTete (PyGame).py", line 1121, in ?...
7
by: Frans Englich | last post by:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: ...
5
by: Fuzzyman | last post by:
Python 2.4 is built with Microsoft Visiual C++ 7. This means that it uses msvcr7.dll, which *isn't* a standard part of the windows operating system. This means that if you build a windows installer...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
3
by: sam | last post by:
Hi.. I'm looking to install dual versions of python 2.3, 2.4 on the same box. I'm trying to figure out if there's something I'm missing, some kind of gotchas that I haven't seen. I'm also...
2
by: Dudeja, Rajat | last post by:
Hi, So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now I would like to take up Tkinter. I'm using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.