[Twisted-Python] installing pyOpenSSL on Centos6 help

After performing a straight-forward install of pyOpenSSL I am getting the following strange import error. Suggestions appreciated! # python Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
Regards, Tom

Did you install pycrypto as well? I think you need to "import Crypto" (uppercase "C") I've got an application written in Twisted that uses pyOpenSSL. It also needs pyasn1, but I forget why. I think the most recent version of pycrypto required it. My app is currently using: Python 2.7.1 zope.interface-3.6.1 Twisted 11.0.0 pyOpenSSL-0.12 pyasn1-0.0.11a pycrypto-2.3 (I'm about to try it with Twisted 12.0.0, and check for any updates of the other packages, but it did work with at least some previous versions of some of them. I can try to track this down if you are stuck on an older version of something.) I installed them in that order. It's running on Suse Linux Enterprise Server 10 SP1, if that turns out to matter. -- John Santos Evans Griffiths & Hart, Inc. 781-861-0670 ext 539 After performing a straight-forward install of pyOpenSSL I am getting the following strange import error. Suggestions appreciated! # python Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import OpenSSL
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "OpenSSL/__init__.py", line 40, in <module> from OpenSSL import crypto ImportError: cannot import name crypto Regards, Tom _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On 13 Feb, 07:54 pm, tom.sheffler@gmail.com wrote:
Notice that the complaint is about "OpenSSL/__init__.py" instead of something more sensible like "/usr/lib/python2.6/site- packages/OpenSSL/__init__.py". You're probably testing this using a working directory inside the pyOpenSSL source directory, and thus getting the wrong version of the OpenSSL package (one that does not include the built extension modules). Try testing in a different directory - or build the extension modules in-place using the -i option to distutils' build_ext command. If this doesn't solve the problem, consider asking in a forum dedicated to CentOS 6 or pyOpenSSL, since the issue isn't really based on any software or other materials from the Twisted project. Also, include more information when you do so, for example a full installation transcript and a manifest of installed files, otherwise it's not likely anyone will be able to provide a better answer. Jean-Paul

Did you install pycrypto as well? I think you need to "import Crypto" (uppercase "C") I've got an application written in Twisted that uses pyOpenSSL. It also needs pyasn1, but I forget why. I think the most recent version of pycrypto required it. My app is currently using: Python 2.7.1 zope.interface-3.6.1 Twisted 11.0.0 pyOpenSSL-0.12 pyasn1-0.0.11a pycrypto-2.3 (I'm about to try it with Twisted 12.0.0, and check for any updates of the other packages, but it did work with at least some previous versions of some of them. I can try to track this down if you are stuck on an older version of something.) I installed them in that order. It's running on Suse Linux Enterprise Server 10 SP1, if that turns out to matter. -- John Santos Evans Griffiths & Hart, Inc. 781-861-0670 ext 539 After performing a straight-forward install of pyOpenSSL I am getting the following strange import error. Suggestions appreciated! # python Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import OpenSSL
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "OpenSSL/__init__.py", line 40, in <module> from OpenSSL import crypto ImportError: cannot import name crypto Regards, Tom _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On 13 Feb, 07:54 pm, tom.sheffler@gmail.com wrote:
Notice that the complaint is about "OpenSSL/__init__.py" instead of something more sensible like "/usr/lib/python2.6/site- packages/OpenSSL/__init__.py". You're probably testing this using a working directory inside the pyOpenSSL source directory, and thus getting the wrong version of the OpenSSL package (one that does not include the built extension modules). Try testing in a different directory - or build the extension modules in-place using the -i option to distutils' build_ext command. If this doesn't solve the problem, consider asking in a forum dedicated to CentOS 6 or pyOpenSSL, since the issue isn't really based on any software or other materials from the Twisted project. Also, include more information when you do so, for example a full installation transcript and a manifest of installed files, otherwise it's not likely anyone will be able to provide a better answer. Jean-Paul
participants (3)
-
exarkun@twistedmatrix.com
-
John Santos
-
Tom Sheffler