[Twisted-Python] installing pyOpenSSL on Centos6 help
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Tue Feb 14 09:41:44 EST 2012
On 13 Feb, 07:54 pm, tom.sheffler at gmail.com wrote:
>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
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
More information about the Twisted-Python
mailing list