[Twisted-Python] Twisted and Centos5 install problems

Doug Farrell dfarrell at mypublisher.com
Tue Feb 5 13:39:07 MST 2008


> > On Fri, 1 Feb 2008 13:34:15 -0500, Doug Farrell
> <dfarrell at mypublisher.com>
> > wrote:
> > >Hello everyone,
> > >
> > >I'm trying to install Twisted 2.5 on a Centos 5 intel based server
> that
> > >has Python 2.4 on it, and am having problems. I download the
Twisted
> 2.5
> > >tar file, unpack it, go to the zope.interface directory and perform
a
> > >"sudo python setup.py install" command, which succeeds. I then go
to
> the
> > >root directory and do the same thing for Twisted "sudo python
> setup.py
> > >install" and it looks like it completes successfully. When I go
into
> the
> > >Python interpreter and enter an "import twisted" line, that works
> fine.
> > >However, if I do this, "from twisted import web" I get an error:
> > >
> > >Python 2.4.3 (#1, Mar 14 2007, 19:01:42)
> > >[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
> > >Type "help", "copyright", "credits" or "license" for more
> information.
> > >>>> from twisted import web
> > >Traceback (most recent call last):
> > >  File "<stdin>", line 1, in ?
> > >ImportError: cannot import name web
> > >
> > >When I look in /usr/lib/python2.4/site-packages/twisted I see that
it
> > >has a web directory, so I'm not sure what's going on or what the
> problem
> > >is. Any insights would be most welcome!
> > >
> >
> > Is this a 64 bit machine?  Do you also have
/usr/lib64/python2.4/site-
> > packages/twisted?  If so, it may be that Python is
> > picking that up, causing it to ignore anything in
> /usr/lib/python2.4/site-
> > packages/twisted.
> >
> > If so, the solution is to tell distutils to install all of Twisted
in
> the
> > same place.  I forget the exact options to do this, you can probably
> find
> > them in the output of "python setup.py install --help".
> >
> > Jean-Paul
> >
> Jean-Paul
> 
> Thanks for the hint, when I looked at the output of uname -a on the
> target machine it reported this:
> 
> Linux dev03.com 2.6.18-8.1.6.el5 #1 SMP Thu Jun 14 17:29:04 EDT 2007
> x86_64 x86_64 x86_64 GNU/Linux
> 
> Which looks like it's running in Intel 64 bit mode to me. So I'll have
> to look around to see how to install Twisted in a 64 environment. Any
> help or suggestions would be greatly appreciated! :)
> 
> Thanks again!
> Doug
> 

Hi everyone,

Just to "close the loop" on this, I re-installed Twisted on this 64 bit
machine like this:

python setup.py install --install-lib=/usr/lib64/python2.4/site-packages

and twisted has installed fine. I'm running my twistd daemon process
right now.

Doug




More information about the Twisted-Python mailing list