473,756 Members | 5,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python 2.5 incompatible with Fedora Core 6 - packaging problems again

I've been installing Python and its supporting packages on
a dedicated server with Fedora Core 6 for about a day now.
This is a standard dedicated rackmount server in a colocation
facility, controlled via Plesk control panel, and turned over
to me with Fedora Core 6 in an empty state. This is the
standard way you get a server in a colo today.

Bringing Python up in this completely clean environment is
a huge hassle, and it doesn't really work.

Fedora Core 6 ships with Python 2.4, which appears to be a
good decision on someone's part. Of course, there's no
standard RPM for a Python 2.5 install on Linux. Packaging is
someone else's problem, according to the Python developers.
So it's necessary to build from source. And the "python.org "
FTP server is down, so even getting the source onto a remote
server is a pain. So I have to download it on another machine
and bring it over with FTP.

Trying to install Python 2.5 yields at least the following problems:

Fedora Core 6 comes with GCC 4.1.1, but the README file
with Python 2.5 says this:

GCC 4.1,
GCC 4.2: There is a known incompatibility between Python and GCC,
where GCC 4.1 and later uses an interpretation of C
different to earlier GCC releases in an area where the C
specification has undefined behaviour (namely, integer arithmetic
involving -sys.maxint-1).

As a consequence, compiling Python with GCC 4.1/4.2 is not
recommended. It is likely that this problem will be resolved
in future Python releases. As a work-around, it seems that
adding -fwrapv to the compiler options restores the earlier
GCC behaviour.

OK, given that, presumably "./configure" takes care of that problem,
right? Anybody know for sure?

"make" runs fine after "./configure".

But "make install" does some compiles, something "install" probably
shouldn't be doing. Some of these compiles fail, with error messages
like
"/var/www/vhosts/sitetruth.com/private/downloads/python/Python-2.5/Modules/_curses_panel.c :271:
error: "PyCursesPanelO bject" has no member named "pan"

But the install script plunges blindly on, presumably installing a broken
Python 2.5. Apparently Fedora Core 6 doesn't come with "curses" preinstalled,
but the Python installer assumes it is there. What's inexcusable is
just plowing on after failed compiles, resulting in a broken install.

It's probably necessary to install something before building Python,
but the README file is silent on this.

OK. Plunging onward, and not really needing the "curses" library,
we try to install MySQLdb. We get that with FTP,
unpack it, go to the approprate directory, and run "python setup.py".
This fails because the MySQL headers aren't installed:

"_mysql.c:35:23 : error: my_config.h: No such file or directory"

OK, looks like we need to install "mysql-devel", so we do that,
using "yum". This forces an update of OpenSSL, Kerberos, and
"e2fsprogs-dev". Which means we should reboot at some point.

But now we can build MySQLdb. So we build and install it.

So then we try "import MySQLdb" in Python 2.5. And we get this:
/usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-i686.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /usr/local/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-i686.egg/_mysql.pyc, but /var/www/vhosts/sitetruth.com/private/downloads/MySQLdb/MySQL-python-1.2.2 is being added to sys.path
import sys, pkg_resources, imp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
File "build/bdist.linux-i686/egg/_mysql.py", line 7, in <module>
File "build/bdist.linux-i686/egg/_mysql.py", line 4, in __bootstrap__
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.p y", line 800, in resource_filena me
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.p y", line 1228, in get_resource_fi lename
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.p y", line 1250, in _extract_resour ce
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.p y", line 880, in get_cache_path
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.p y", line 846, in extraction_erro r
pkg_resources.E xtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

[Errno 13] Permission denied: '/var/www/vhosts/sitetruth.com/.python-eggs'

The Python egg cache directory is currently set to:

/var/www/vhosts/sitetruth.com/.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACH E environment
variable to point to an accessible directory.
So what's going on? We've run into a conflict between an assumption of Python
and of the Plesk control panel. Plesk doesn't let the user create files
in their own home directory. This installer assumes it can. Oops.
(Plesk sets up a very locked down environment, which is a good thing on
a web server.)

So, becoming the super-user, we create .python-eggs and change its ownership.
Now we can import MySQLdb into Python.

Now it turns out that we have Python 2.4 in /usr/bin, and Python 2.5
in /usr/local/bin. That's where the installer put it. So the CGI
scripts are invoking the wrong version of Python. The scripts had to
be changed.

At last, MySQLdb is connecting to MySQL properly. However, the SSL module
seems to be broken. Tomorrow I'll deal with that, and try to get
M2Crypto installed, always a tough job.

This kind of nonsense is why hosting companies don't want to support Python.
Perl and PHP may be dumb, but they just work. Java has a company behind it.
Python just isn't ready. Which is embarassing, ten years on.

If the Python crowd wants market share, attention, and a career path,
this has to be fixed.

John Nagle
Mar 4 '07
15 2959
John Nagle <na***@animats. comwrites:
sk**@pobox.com wrote:
The distutils setup.py script checks for ncurses bits

No, it just plows on after compiler errors.
As another person pointed out, you're conflating Python proper with a
specific Linux distribution's packaging techniques.

Exactly. As I've pointed out before, Python doesn't play well with
others. The Python developers pass the buck to the Linux packager, the
Linux packager passes the buck to the Python developers, and thus
the user experience sucks.
I must say in my personal experience this is rather common with, well,
software ;-)

Traditionally, in the open source world, one does something about it,
or shuts up after having made one's point, say, ten or twenty times
<wink>

Debian seems to have struggled through this problem, but Red Hat
apparently just decided to give up keeping up with Python versions.
Red Hat has traditionally been painful with Python. People say this
is because of their own use of Python scripts, though I don't really
understand why that's caused all the problems they seem to have had.
From what you say I take it that's still the case... I always used to
just build my own Python and found the pain reduced in my particular
case (still do that, on Ubuntu). But I typically find that true with
anything "serious" -- compiling my own has often ended up less painful
in the long run, though apparently other people's MMV.

Also there's the traditional open source problem (this one by no means
restricted to Python, or even to open-source OSes -- I suffered this
on Solaris recently) of distros splitting software up and generally
"knowing better" than the maintainer. I can understand there are
sometimes good security and integration reasons for this, but they
seem to get overzealous. Recently, there's been some Python-specific
trouble of the "knowing better" kind with setuptools (popular
distutils extension) on various Linux systems, but that seems to have
quietened down now...

And there's always some degree of pain from distutils, which is
unmaintained and not terribly flexible (though still very useful).
John
Mar 11 '07 #11
John Nagle <na***@animats. comwrites:
[...]
Perl, PHP, C, C++, and Java don't have this particular
problem. Python stands alone, out in the cold.
[...]

I guess different people's experiences differ. I remember trying to
install Java on a FreeBSD server a few years back. I recall no single
software installation that has caused me anywhere near such pain as
that one :-)

Of course, FreeBSD is a minority thing compared with RedHat.
John
Mar 11 '07 #12
John Nagle <na***@animats. comwrites:
[...]
This kind of nonsense is why hosting companies don't want to support Python.
<snigger There seems a more obvious reason...

Perl and PHP may be dumb, but they just work. Java has a company behind it.
Python just isn't ready. Which is embarassing, ten years on.
[...]

I recall similar pain with Perl. The one Perl list I still frequent
has regular postings about these kinds of problems (which are rarely
answered -- perhaps the maintainers have moved on).

My occasional Java experiences have been *far*, *far* worse in this
respect that what I've seen with either Perl or Python.

Does that tell you much? Not really, and neither do your experiences.
John
Mar 11 '07 #13
John J. Lee wrote:
John Nagle <na***@animats. comwrites:

>>sk**@pobox.co m wrote:
The distutils setup.py script checks for ncurses bits

No, it just plows on after compiler errors.
Red Hat has traditionally been painful with Python.
....
Also there's the traditional open source problem (this one by no means
restricted to Python, or even to open-source OSes -- I suffered this
on Solaris recently) of distros splitting software up and generally
"knowing better" than the maintainer.
Hit that with OpenSSL. Red Hat took elliptical curve cryptography
out of Fedora 6 for patent reasons. With that missing, M2Crypto won't
build. It ought to; the implementor of M2Crypto thought of that, because
it's an optional feature. But M2Crypto uses SWIG. SWIG doesn't normally
process nested include files. OpenSSL had changed their configuration
approach to use nested include files. So SWIG didn't see the #define that
said to turn off elliptical curve crypto support. This resulted in
compile errors in the 24,000 lines of code that come out of SWIG.

Three days of work to figure that out.

John Nagle
Mar 11 '07 #14
John J. Lee wrote:
John Nagle <na***@animats. comwrites:

>>sk**@pobox.co m wrote:
Traditionally, in the open source world, one does something about it,
or shuts up after having made one's point, say, ten or twenty times
In retail, there's an assumption that for every customer who complains
about a real problem, about a hundred customers noticed it and didn't complain,
and about twenty of them will never come back.

There's a great little book, "A Complaint is a Gift", about this.

John Nagle
Mar 11 '07 #15
John Nagle <na***@animats. comwrites:
John J. Lee wrote:
John Nagle <na***@animats. comwrites:
>sk**@pobox.c om wrote:
Traditionally, in the open source world, one does something about it,
or shuts up after having made one's point, say, ten or twenty times

In retail, there's an assumption that for every customer who complains
about a real problem, about a hundred customers noticed it and didn't complain,
and about twenty of them will never come back.
....and, in the gift economy of open source, it's for the giver to
recognise that, and the receiver to stop whingeing about it.
John
Mar 11 '07 #16

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

Similar topics

1
1908
by: Thomas | last post by:
Python/Tk (Tkinter) does not work under Fedora Core 1; the problem seems to be, that the Python RPM package uses a Python which was compiled with the UCS4 option, whereas Tcl/Tk uses UCS2. My solution: I got the Python 2.2 (FC1 uses Python 2.2) and Tkinter RPM packages from python.org and updated Python and Tkinter with those packages (rpm -U ...). (Luckily, the version numbers of the python.org RPMs are higher than those from the FC1...
4
3848
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or less - during my own installation of Python 2.3 on Fedora Core 1 Linux for a friend of mine). Anyway, HTH, L.
1
2391
by: Emile van Sebille | last post by:
QOTW: "If we get 2.3.3c1 out in early December, we could release 2.3.3 final before the end of the year, and start 2004 with a 100% bug-free codebase <wink>." -- Tim Peters "cjOr proWe vbCould vbSettle prpFor noEnglish prpIn adjHungarian noNotation :-)" -- noPeter Jack Jensen reveals that python on mac continues as an osx option only starting with python2.4.
7
3212
by: Edward Diener | last post by:
I can install Python 2.4 on the Fedora 3 Linux system, but after I do a number of Linux utilities and commands, like yum, stop working because they were dependent on the Python 2.3 installation. What happens is that Python 2.4 replaces the /usr/bin/python module with the Python 2.4 version. If I replace /usr/bin/python with the Python 2.3 version executable, which is still on my system, that all the aforesaid modules depend on, they start...
1
3699
by: Robert Uhl | last post by:
Well, I upgraded to Fedora Core 4 and now PostgreSQL won't start, since my data files are from a previous version. A little Googling shows that I should have exported my data before upgrading--news that would have been useful at the time. I've tried to install a 7.x version, but am having major RPM dependency issues. Has anyone figured out how to back out 8.x, install 7.x, export data and move on with life on Fedora 4? There's quite a...
0
281
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 422 open ( +2) / 3415 closed ( +5) / 3837 total ( +7) Bugs : 933 open (+18) / 6212 closed (+26) / 7145 total (+44) RFE : 237 open ( +2) / 239 closed ( +1) / 476 total ( +3) New / Reopened Patches ______________________
4
3380
by: Alia Khouri | last post by:
Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems which seems to be more more mature and usable. From my perspective, the relative immaturity of setuptools and its simultaneous widespread use is a clear python weakness and can make python less easy to absorb than it should be. A few...
0
9287
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.