Twisted installation and use

Who used twisted can you tell me how to install, how to run to you


Thank you

Started by Don at February 08, 2016 - 10:53 AM

Google or Baidu first

Posted by Kris at February 14, 2016 - 11:41 AM

Reprint:
Twisted is used to Python the network service and application programming framework, before installing the Twisted pre installed Python system.
One, the installation of Twisted
1, Download Twisted
Download Twisted from here, Win32, source, Mac version, there are two version supports python2.4 and 2.5 of Win32, according to the version of Python you download, today is in the Linux, so the direct download source version of it. The current version number is Twisted-8.1.0
2, Install Twisted
Download the Twisted, enter the download directory, decompression:
[root@codebreaker ~]#tar -jvxf Twisted-8.1.0.tar.bz2
Unzip into the appropriate directory:
[root@codebreaker ~]#cd Twisted-8.1.0
To perform the installation:
[root@codebreaker Twisted-8.1.0]#python setup.py install
After the installation is completed in Python, Twisted is installed successfully tested
[root@codebreaker Twisted-8.1.0]# python
Python 2.5 (r25:51908, May 26 2008, 17:47:47)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import twisted
>>>
If no error occurs, indicating that Twisted has been installed successfully
Two, the installation of PyOpenSSL
PyOpenSSL is the python OpenSSL interface, for providing encryption transmission support for Twisted (SSL), this package does not need to be installed, but if not installed you will not be able to use Twisted SSL function. (a bag, very little with it, not bad)
1, Download PyOpenSSL, the installation of the package is pyOpenSSL-0.7.tar.gz
2, Install PyOpenSSL
[root@codebreaker ~]#tar -zvxf pyOpenSSL-0.7.tar.gz
[root@codebreaker ~]#cd pyOpenSSL-0.7
[root@codebreaker pyOpenSSL-0.7]#python setup.py install
3, To test whether the successful installation
[root@codebreaker ~]# python
Python 2.5 (r25:51908, May 26 2008, 17:47:47)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenSSL
>>> import twisted.internet.ssl
>>> twisted.internet.ssl
<module 'twisted.internet.ssl' from '/usr/python/lib/python2.5/site-packages/Twisted-8.1.0-py2.5-linux-i686.egg/twisted/internet/ssl.pyc'>
If a similar tips, indicating that pyOpenSSL module is installed successfully, otherwise, please check the installation process.
Three, the installation of PyCrypto
PyCrypto like pyOpenSSL, a support tool Twisted is set, the difference is PyCrypto with the SSH connection function.
1, Download PyCrypto, the installation of the package is pycrypto-2.0.1.tar.tar
2, Install PyCrypto
[root@codebreaker ~]#tar -zvxf pycrypto-2.0.1.tar.tar
[root@codebreaker ~]#cd pycrypto-2.0.1
[root@codebreaker pycrypto-2.0.1]#python setup.py install
3, To test whether the successful installation
[root@codebreaker ~]# python
Python 2.5 (r25:51908, May 26 2008, 17:47:47)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Crypto
>>> import twisted.conch.ssh.transport
>>> print Crypto.PublicKey.RSA
<module 'Crypto.PublicKey.RSA' from '/usr/python/lib/python2.5/site-packages/Crypto/PublicKey/RSA.pyc'>
>>>
RSA.pyc position, that have been installed successfully.
Thus, the installation is complete.

Posted by Arvin at December 13, 2016 - 7:06 AM

The windows platform above I know, other platforms have not tried´╝ü

Posted by Amanda at December 15, 2016 - 7:13 AM

Posted by Stev at December 22, 2016 - 7:58 AM

Please read the official document.

Posted by Alger at December 29, 2016 - 8:29 AM

http://wenku.baidu.com/view/97214723192e45361066f50d.html

Posted by Saxon at January 01, 2017 - 8:50 AM

The error message I installed twisted, trouble you to help me:

[root@localhost Twisted-12.1.0]# python setup.py install
Traceback (most recent call last):
File "setup.py", line 102, in ?
main(sys.argv[1:])
File "setup.py", line 45, in main
from twisted import copyright
File "./twisted/__init__.py", line 14, in ?
raise RuntimeError("Twisted requires Python 2.5 or later.")
RuntimeError: Twisted requires Python 2.5 or later.
[root@NBU-BJ-S-FSCS-004-D-5 Twisted-12.1.0]# python2.6
Python 2.6 (r26:66714, Jul 12 2012, 15:06:56)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Twisted
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Twisted
>>>

Python is the 2.6 version of Python installed, use other software is no problem

Posted by Tyrone at January 01, 2017 - 9:46 AM

Official website for installation instructions.

Posted by Jeremy at January 06, 2017 - 10:51 AM

May LZ to install multiple versions of Python

First, check out Python -v

If it is not, can python2.6 setup.py install

Posted by Ernest at January 11, 2017 - 10:19 AM

I also is same, want to know the solution.

Posted by Benson at January 13, 2017 - 9:19 AM