I recently installed python 2.4, and many installed software packages
stopped working. Some things got working after I copied some files and
directories from /usr/lib/python2.3/site-packages to
/usr/lib/python2.4/site-packages, but I also had to install a newer
PyXml package, as some of the files that came with python2.4 required a
newer version of pyxml than I had in python2.3/site-packages.
I wonder if there is any particular reason I have no
/usr/lib/site-python directory, and everything is installed in
version-specific site-packages.
I have Fedora Core 3. Is it the Fedora packagers who prefer installing
everything in the version-specific directory? Is there no way to have
older packages continue working in the presence of python2.4? (I still
want the newest to be the default!)
I have tried (cd /usr/bin; grep '#!.*python' * 2>/dev/null), and very
few of the programs have a specific version in the interpreter line. Is
there any good reason this is so?
Thinking about it, a particular python program may require a particular
module, but not any particular version of python or the module. The
module perhaps requires at least python2.3, but could run just as well
with python2.4 or later. It does not make sense to have the program
demand a particular version of python in its interpreter string (e.g.,
"#!/usr/bin/python2.3"), but what about the module. Would it be better
to put the module in site-python and include code to check the
interpreter version?
Perhaps there is no perfect solution that covers all permutations, but
on the other hand, what is currently the "correct philosophy" of
version handling? 3 1409 en***@online.no wrote: I recently installed python 2.4, and many installed software packages stopped working. Some things got working after I copied some files and directories from /usr/lib/python2.3/site-packages to /usr/lib/python2.4/site-packages, but I also had to install a newer PyXml package, as some of the files that came with python2.4 required a newer version of pyxml than I had in python2.3/site-packages.
I wonder if there is any particular reason I have no /usr/lib/site-python directory, and everything is installed in version-specific site-packages.
Well, broadly, the reason is that it allows version-specific code to be
included in libraries.
Of course, Python is so good at maintaining backward compatibility that
it's unlikely a pure Python module will fail to run on the next version
of Python. But you have to do this for extension modules, where the code
is compiled against a specific version of the Python interpreter API,
which doesn't stay the same from one version to the next.
I have Fedora Core 3. Is it the Fedora packagers who prefer installing everything in the version-specific directory? Is there no way to have older packages continue working in the presence of python2.4? (I still want the newest to be the default!)
I have tried (cd /usr/bin; grep '#!.*python' * 2>/dev/null), and very few of the programs have a specific version in the interpreter line. Is there any good reason this is so?
Thinking about it, a particular python program may require a particular module, but not any particular version of python or the module. The module perhaps requires at least python2.3, but could run just as well with python2.4 or later. It does not make sense to have the program demand a particular version of python in its interpreter string (e.g., "#!/usr/bin/python2.3"), but what about the module. Would it be better to put the module in site-python and include code to check the interpreter version?
Perhaps there is no perfect solution that covers all permutations, but on the other hand, what is currently the "correct philosophy" of version handling?
The current "correct" philosophy is to have version-specific libraries.
Of course, there is nothing to stop you building your own
*no*-version-specific library directory and configuring it on to the
PYTHONPATH for each version you run.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
> Well, broadly, the reason is that it allows version-specific code to
be included in libraries.
I've actually found this to be a bit of a pain. I build packages
against say, python2.2, and if you upgrade python to 2.3 the package
breaks. The code works fine so saying it requires python >= 2.2 should
be valid, but the version-specific path prevents that.
Mike
msoulier wrote: Well, broadly, the reason is that it allows version-specific code to
be
included in libraries.
I've actually found this to be a bit of a pain. I build packages against say, python2.2, and if you upgrade python to 2.3 the package breaks. The code works fine so saying it requires python >= 2.2 should be valid, but the version-specific path prevents that.
Mike
Well, if you can invent a reliable mechanism for managing
version-independent extensions I'm sure the developers will be happy to
hear about it :-)
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dieter Vanderelst |
last post by:
Dear all,
I'm currently comparing Python versus Perl to use in a project that
involved a lot of text processing. I'm trying to determine what the most
efficient language would be for our...
|
by: Joshua D. Drake |
last post by:
Hello,
I think the below just about says it all:
http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg
Sincerely,
Joshua Drake
|
by: Andrew Robinson |
last post by:
I need to create a shared static field for use within a number of different
classes. Which one should I be using or are they all really the same thing?
public class Widget
{
private Widget() {}...
|
by: Jon Lapham |
last post by:
I have a table that stores TEXT information. I need query this table to
find *exact* matches to the TEXT... no regular expressions, no LIKE
queries, etc. The TEXT could be from 1 to 10000+...
|
by: Xah Lee |
last post by:
Tabs versus Spaces in Source Code
Xah Lee, 2006-05-13
In coding a computer program, there's often the choices of tabs or
spaces for code indentation. There is a large amount of confusion about...
|
by: johnpa60 |
last post by:
Hello
Anyone here has seen any materials on comparing DB2 CM versus Domino
Doc Server? Can you please point me?
If any of you have worked on both products, can you please spend few
minutes...
|
by: John Doty |
last post by:
I realized that I have a little job on the table that is a fine test of
the Python versus Standard Forth code availability and reusability issue.
Note that I have little experience with either...
|
by: blangela |
last post by:
I have decided (see earlier post) to paste my Word doc here so that it
will be simpler for people to provide feedback (by directly inserting
their comments in the post). I will post it in 3 parts...
|
by: John LaRusic |
last post by:
Hi all,
I'm fairly new to the world of schemas, but I have a question that I
hope someone can help answer for me. I'm curious as to what the
difference is between an element and a complexType?...
|
by: aj |
last post by:
DB2 8.2 LUW FP14
Is there any real difference between
select blahblahblah... where blah IN (select blah......)
versus
select blahblahblah... where blah = ANY (select blah.....)
versus
select...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
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$) {
}
...
|
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...
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |