Error 'No module named _sha256' when importing random in python 2.7.1

Wong Wah Meng-R32813 r32813 at
Tue Sep 27 05:28:31 EDT 2011

I just built python 2.7.1 on my HP Itanium 64-bit platform, using aCC. I encountered following issue when importing the random module. Does anyone know why am I getting this error? Thanks in advance for your reply. 

$ python
Python 2.7.1 (r271:86832, Sep 27 2011, 15:19:26) [C] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 49, in <module>
    import hashlib as _hashlib
  File "", line 136, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "", line 74, in __get_builtin_constructor
    import _sha256
ImportError: No module named _sha256

More information about the Python-list mailing list