[Twisted-Python] epoll reactor in Twisted 2.50 tarball
![](https://secure.gravatar.com/avatar/521b986cb6bb1912f71793aa76507a19.jpg?s=120&d=mm&r=g)
Hello guys, I have to install Twisted 2.50 on our Ubuntu Dapper servers. The problem is that I have to use the Twisted 2.50 tarball since Dapper apt repositories only have Twisted 2.40. The installation went smoothly and my twisted applications works except that when I try to run my scripts using the epoll reactor (twistd -ny ./myscript -r epoll) I get this error. Traceback (most recent call last): File "/usr/bin/twistd", line 21, in ? run() File "/usr/lib/python2.4/site-packages/twisted/scripts/twistd.py", line 27, in run app.run(runApp, ServerOptions) File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 374, in run config.parseOptions() File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 354, in parseOptions usage.Options.parseOptions(self, options) File "/usr/lib/python2.4/site-packages/twisted/python/usage.py", line 177, in parseOptions self.__dispatch[optMangled](optMangled, arg) File "/usr/lib/python2.4/site-packages/twisted/python/usage.py", line 333, in <lambda> fn = lambda name, value, m=method: m(value) File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 276, in opt_reactor installReactor(shortName) File "/usr/lib/python2.4/site-packages/twisted/application/reactors.py", line 80, in installReactor installer.install() File "/usr/lib/python2.4/site-packages/twisted/application/reactors.py", line 60, in install namedAny(self.moduleName).install() File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line 357, in namedAny topLevelPackage = __import__(trialname) File "/usr/lib/python2.4/site-packages/twisted/internet/epollreactor.py", line 22, in ? from twisted.python import _epoll ImportError: cannot import name _epoll On my workstation (LinuxMint 3.0), the epoll reactor works fine. The difference is that I installed Twisted via apt-get. Thanks in advance for anyone who can point me to the right way. --- Alvin Delagon
![](https://secure.gravatar.com/avatar/a61e243764490913906c773c9acb0d3c.jpg?s=120&d=mm&r=g)
"Alvin Delagon" <adelagon@gmail.com> writes:
I have to install Twisted 2.50 on our Ubuntu Dapper servers. The problem is that I have to use the Twisted 2.50 tarball since Dapper apt repositories only have Twisted 2.40. The installation went smoothly and my twisted applications works except that when I try to run my scripts using the epoll reactor (twistd -ny ./myscript -r epoll) I get this error. (...)
When you built Twisted (through the setup.py script) it will build the epoll reactor if it can find the /usr/include/sys/epoll.h header file. So you might check if that is present on the system where you built Twisted. If not, you're probably missing some development packages. On my Ubuntu feisty system the file comes as part of the libc6-dev package. -- David
![](https://secure.gravatar.com/avatar/521b986cb6bb1912f71793aa76507a19.jpg?s=120&d=mm&r=g)
Just fixed it guys. Forgot to install python-dev first. ^_^ On 9/10/07, Alvin Delagon <adelagon@gmail.com> wrote:
Hello guys,
I have to install Twisted 2.50 on our Ubuntu Dapper servers. The problem is that I have to use the Twisted 2.50 tarball since Dapper apt repositories only have Twisted 2.40. The installation went smoothly and my twisted applications works except that when I try to run my scripts using the epoll reactor (twistd -ny ./myscript -r epoll) I get this error.
Traceback (most recent call last): File "/usr/bin/twistd", line 21, in ? run() File "/usr/lib/python2.4/site-packages/twisted/scripts/twistd.py", line 27, in run app.run (runApp, ServerOptions) File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 374, in run config.parseOptions() File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 354, in parseOptions usage.Options.parseOptions(self, options) File "/usr/lib/python2.4/site-packages/twisted/python/usage.py", line 177, in parseOptions self.__dispatch[optMangled](optMangled, arg) File "/usr/lib/python2.4/site-packages/twisted/python/usage.py", line 333, in <lambda> fn = lambda name, value, m=method: m(value) File "/usr/lib/python2.4/site-packages/twisted/application/app.py", line 276, in opt_reactor installReactor(shortName) File "/usr/lib/python2.4/site-packages/twisted/application/reactors.py", line 80, in installReactor installer.install() File "/usr/lib/python2.4/site-packages/twisted/application/reactors.py", line 60, in install namedAny(self.moduleName).install() File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line 357, in namedAny topLevelPackage = __import__(trialname) File "/usr/lib/python2.4/site-packages/twisted/internet/epollreactor.py", line 22, in ? from twisted.python import _epoll ImportError: cannot import name _epoll
On my workstation (LinuxMint 3.0), the epoll reactor works fine. The difference is that I installed Twisted via apt-get. Thanks in advance for anyone who can point me to the right way.
--- Alvin Delagon
participants (2)
-
Alvin Delagon
-
David Bolen