[csw-users] python broken?

Gerard Henry ghenry at cmi.univ-mrs.fr
Sun Oct 7 08:58:54 CEST 2012


On 10/01/12 03:50 PM, Maciej (Matchek) Bliziński wrote:
> I've seen the same error. Did you dig down to the root cause? For
> example, did you try replacing the md5 (obsolete module) import with an
> import of the hashlib module?


but how?
i don't see where md5 is imported?
t2000 # ggrep -r md5 *
Binary file my_new_env/lib/python2.6/lib-dynload/_hashlib.so matches

seems to appear only in _hashlib.so coming from 
/opt/csw/lib/python/lib-dynload/_hashlib.so



anyway, md5 seems to be here:
t2000 # /opt/csw/bin/python
Python 2.6.8 (unknown, Sep 20 2012, 17:14:14) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
 >>> import md5
__main__:1: DeprecationWarning: the md5 module is deprecated; use 
hashlib instead
 >>>

my guess is that something is wrong in python, because it does:
Installing setuptools......
   Complete output from command 
/donnees/virtualenv/my_new_env/bin/python -c "#!python
\"\"\"Bootstra...sys.argv[1:])

" --always-copy -U setuptools:
   Traceback (most recent call last):
   File "<string>", line 67, in <module>
ImportError: No module named md5

First, i don't understand why it needs to install setuptools since it's 
here:
t2000 # pkginfo  CSWpysetuptools
application CSWpysetuptools pysetuptools - Distribution Utiltiies for Python

if i try to install setuptools manually and follow the "virtual" way:
t2000 # /opt/csw/bin/python virtual-python.py -v
Creating /root/lib/python2.6
Traceback (most recent call last):
   File "virtual-python.py", line 122, in <module>
     main()
   File "virtual-python.py", line 86, in main
     for fn in os.listdir(stdlib_dir):
OSError: [Errno 2] No such file or directory: '/opt/csw/lib/python2.6'

is it normal that this lib doesn't exist?
trying to create a simple link:
t2000 # ln -s /opt/csw/lib/python/ /opt/csw/lib/python2.6

then the error is more precise:
Installing setuptools...
   -c:67: DeprecationWarning: the md5 module is deprecated; use hashlib 
instead
   Traceback (most recent call last):
     File "<string>", line 67, in <module>
     File "/opt/csw/lib/python2.6/md5.py", line 10, in <module>
       from hashlib import md5
     File "/opt/csw/lib/python2.6/hashlib.py", line 136, in <module>
       md5 = __get_builtin_constructor('md5')
     File "/opt/csw/lib/python2.6/hashlib.py", line 63, in 
__get_builtin_constructor
       import _md5
   ImportError: No module named _md5

it seems that this error is related to openssl libs?!
sorry no idea more

thanks for help,

gerard



More information about the users mailing list