Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install twisted package on windows machine

I have got python2.6 installed on my windows machine.

tried to install twisted package but unable to install it.

Also installed the zope interface

On the python interpretor I get the error as :

  >>>import twisted
  >>>Import Error: No Module named twisted

I installed the package twisted succesfully.

C:\Documents and Settings\tazim_kolhar>python
Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import twisted
>>> ^Z

But when, I try to run the script containing the package :

C:\Documents and Settings\tazim_kolhar>cd ..

C:\Documents and Settings>cd ..

C:\>cd Python_scripts


C:\Python_scripts>python aimbot.py
aimbot.py:10: DeprecationWarning: twisted.words.protocols.toc is deprecated sinc
e Twisted 9.0.  Use twisted.words.protocols.oscar instead.
from twisted.words.protocols import toc
Traceback (most recent call last):
File "aimbot.py", line 10, in <module>
from twisted.words.protocols import toc
File "C:\Python26\Lib\site-packages\twisted\words\protocols\toc.py", line 27,
in <module>
from twisted.internet import reactor, protocol
File "C:\Python26\Lib\site-packages\twisted\internet\reactor.py", line 37, in
<module>
from twisted.internet import selectreactor
File "C:\Python26\Lib\site-packages\twisted\internet\selectreactor.py", line 1
7, in <module>
from zope.interface import implements
ImportError: No module named zope.interface

C:\Python_scripts>

I have downloded the zope interface . But the document http://twistedmatrix.com/trac/wiki/WindowsBuilds does not clearly explain about the zope interface.

How do I install this zope interface ?

Any help will be valuable .

Thanks, Tazim.

like image 337
Star123 Avatar asked Nov 15 '10 07:11

Star123


2 Answers

The steps to install the package are as follows :

  1. Install python any version .

  2. Then, Install the appropriate exe

    http://twistedmatrix.com/trac/wiki/Downloads

    Twisted 10.1.0 for Python 2.6 ( msi | exe) or Twisted 10.1.0 for Python 2.5 ( msi | exe)

  3. download the zope interface .

    http://twistedmatrix.com/trac/wiki/Downloads

  4. Install setuptools

    http://pypi.python.org/pypi/setuptools#downloads

    Update the PATH variable to the subdirectory containing easy_install.exe .

  5. install zope interface using :

    easy_install zope.interface-3.6.1-py2.5-win32.egg

like image 194
Star123 Avatar answered Oct 01 '22 05:10

Star123


The documentation for building Twisted on Windows is here. Follow that and you should not face any problem.

Since the import fails, clearly something is not right, so you should follow the steps in the manual above.

like image 26
user225312 Avatar answered Oct 01 '22 04:10

user225312