Ask Your Question
1

ImportError: cannot import name md5

asked 2012-07-30 14:18:36 +0100

anonymous user

Anonymous

updated 2012-07-30 15:58:58 +0100

benjaminfjones gravatar image

Info about my machine:

Linux my.box.net 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul 19 22:54:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Linux version 3.4.6-2.fc17.x86_64 (mockbuild@buildvm-09.phx2.fedoraproje...) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Thu Jul 19 22:54:16 UTC 2012

Fedora release 17 (Beefy Miracle)

OpenSSL 1.0.0j-fips 10 May 2012

========================================

The version of sage I am trying to run:

sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux

========================================

What happens when I run it:

# ./sage

----------------------------------------------------------------------
| Sage Version 5.1, Release Date: 2012-07-09                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python/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 "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/bin/sage-ipython", line 18, in <module>
    import IPython
  File "/opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/python2.7/site-packages/IPython/__init__.py", line 58, in <module>
    __import__(name,glob,loc,[])
  File "/opt ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-21 11:21:04 +0100

tmonteil gravatar image

According to this post, the OS on which the sage binary was built (RHEL 5.6 tikanga) uses openssl 0.9.8. Unfortunately, the openssl library is not shipped with Sage binaries. Hence Sage will use the openssl library that is installed on your computer. According to this post, your OS (Fedora release 17) uses openssl 1.0.0. Openssl 0.9.8 and 1.0.0 are not compatible, which explains your problem.

This problem was reported as trac ticket 13666.

You can fix this by either:

  • find a copy of the files libssl.so.0.9.8 and libcrypto.so.0.9.8 shipped with RHEL 5.6 tikanga and copy them to ${SAGE_DIR}/local/lib/libssl.so and `${SAGE_DIR}/local/lib/libcrypto.so' respectively.

or

  • compile sage from source on your machine
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-30 14:18:36 +0100

Seen: 8,898 times

Last updated: Apr 21 '13