Install Twisted (Python) on CentOS 6

Make sure the current system is up-to date

yum update

Install the necessary packages required to satisfy Twisted’s dependancies.

yum install wget python-devel python-zope-interface

Also install the Development Tools

yum group install “Development Tools”

Download the Twisted Framework (example location: ~/src)

wget http://twistedmatrix.com/Releases/Twisted/12.1/Twisted-12.1.0.tar.bz2

Extract files and install

tar jxvf Twisted-12.1.0.tar.bz2
cd Twisted-12.1.0.tar.bz2
python setup.py install

Test the installation was successful by creating a Python test file.

nano twistedTest.py

Insert the following lines:

import twisted
import twisted.web

Save the file

Ctrl-X (Enter filename when prompted)

Execute the file with hopefully no errors

python twistedTest.py

Leave a Reply

Your email address will not be published. Required fields are marked *