ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activepython
activepython
hashlib problem
by Mike Pechkin other posts by this author
Feb 26 2009 2:15AM messages near this date
view in the new Beta List Site
| Re: hashlib problem
hi,
OS: Redhat4

I've download to versions of ActiveState python
ActivePython-2.5.4.3-linux-x86.tar.gz
ActivePython-2.6.1.1-linux-x86.tar.gz

Both version has been successfully installed.
Simple python code doesn't work on Python 2.5.
What I've missed or what's wrong with Python 2.5?

# ./python26/bin/python
ActivePython 2.6.1.1 (ActiveState Software Inc.) based on
Python 2.6.1 (r261:67515, Dec  5 2008, 12:22:31)
[GCC 3.3.1 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> >> import hashlib
> >> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest()
'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2'
> >>

# ./python25/bin/python
ActivePython 2.5.4.3 (ActiveState Software Inc.) based on
Python 2.5.4 (r254:67916, Jan 20 2009, 14:17:32)
[GCC 3.3.1 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> >> import hashlib
Traceback (most recent call last):
  File "<stdin> ", line 1, in <module>
  File "/root/python25/lib/python2.5/hashlib.py", line 133, in <module> 
    md5 = __get_builtin_constructor('md5')
  File "/root/python25/lib/python2.5/hashlib.py", line 60, in
__get_builtin_constructor
    import _md5
ImportError: No module named _md5
> >> hashlib.sha224("Nobody inspects the spammish repetition").hexdigest()
Traceback (most recent call last):
  File "<stdin> ", line 1, in <module>
NameError: name 'hashlib' is not defined

--mpech
Thread:
Mike Pechkin
Trent Mick

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved