compiling py 2.7.3 with openssl

V N vijay.nori at gmail.com
Sun Jun 10 04:58:07 CEST 2012


RHEL 5.3 x86_64 / Python 2.7.3

compiled as shown below ==>

    PYTHON=Python-2.7.3
    tar xjf bin/$PYTHON.tar.bz2
    cd $PYTHON
    PYHOME=/usr/local/$PYTHON; export PYHOME
    LDFLAGS="-L/usr/local/lib64"; export LDFLAGS
    CPPFLAGS="-I/usr/local/include/ncurses -I/usr/local/include/readline -I/usr/local/include"; export CPPFLAGS
    ./configure --prefix=$PYHOME 1>"$PYTHON"_cfg.log 2>&1
    make 1>"$PYTHON"_mk.log 2>&1
    sudo make install 1>"$PYTHON"_inst.log 2>&1

able to install setuptools-0.6c11 and libraries such as nose, cx_Oracle, pyODBC, etc.

suppose I compile and install openssl (same thing happens with openssl 1.0.0x as well)

    OPNSSL=openssl-1.0.1c
    tar xzf bin/$OPNSSL.tar.gz
    cd $OPNSSL
    ./config --prefix=/usr/local zlib-dynamic 1>"$OPNSSL"_cfg.log 2>&1
    make 1>"$OPNSSL"_mk.log 2>&1
    sudo make install 1>"$OPNSSL"_inst.log 2>&1

and change CPPFLAGS as
    CPPFLAGS="...  -I/usr/local/include/openssl -I/usr/local/include"; export CPPFLAGS

I can compile python but when I trying to install setuptools-0.6c11, I get

[... setuptools-0.6c11]$ sudo -E $PYHOME/bin/python setup.py build install
running build
running build_py
running install
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Python-2.7.3/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "setup.py", line 94, in <module>
    scripts = scripts,
  File "/usr/local/Python-2.7.3/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/Python-2.7.3/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Python-2.7.3/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/export/home/myacc/setuptools-0.6c11/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/export/home/myacc/setuptools-0.6c11/setuptools/command/install.py", line 85, in do_egg_install
    easy_install = self.distribution.get_command_class('easy_install')
  File "/export/home/myacc/setuptools-0.6c11/setuptools/dist.py", line 395, in get_command_class
    self.cmdclass[command] = cmdclass = ep.load()
  File "/export/home/myacc/setuptools-0.6c11/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/export/home/myacc/setuptools-0.6c11/setuptools/command/easy_install.py", line 21, in <module>
    from setuptools.package_index import PackageIndex, parse_bdist_wininst
  File "/export/home/myacc/setuptools-0.6c11/setuptools/package_index.py", line 10, in <module>
    from md5 import md5
  File "/usr/local/Python-2.7.3/lib/python2.7/md5.py", line 10, in <module>
    from hashlib import md5
ImportError: cannot import name md5


More information about the Python-list mailing list