Sage on the latest Ubuntu, _md5 ImportError

134 views
Skip to first unread message

Ondřej Čertík

unread,
Jan 24, 2012, 6:25:12 PM1/24/12
to sage-support
Hi,

I downloaded the latest Sage binary for Ubuntu and I use Ubuntu 11.10.
Here is what I got when I started it:


ondrej@eagle:~/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux$ ./sage
----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
The Sage installation tree may have moved
(from /scratch/buildbot/sage/redhawk-1/redhawk_binary/build/sage-4.8
to /home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux).
Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done resetting paths.
Traceback (most recent call last):
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/bin/sage-ipython",
line 18, in <module>
import IPython
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-packages/IPython/__init__.py",
line 58, in <module>
__import__(name,glob,loc,[])
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-packages/IPython/ipstruct.py",
line 17, in <module>
from IPython.genutils import list2dict2
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-packages/IPython/genutils.py",
line 53, in <module>
from IPython.external.path import path
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.6/site-packages/IPython/external/path.py",
line 35, in <module>
import md5
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/md5.py",
line 10, in <module>
from hashlib import md5
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py",
line 136, in <module>
md5 = __get_builtin_constructor('md5')
File "/home/ondrej/ext/sage-4.8-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py",
line 63, in __get_builtin_constructor
import _md5
ImportError: No module named _md5


So I guess I should compile from source. Just wanted to let you know.
The missing _md5 usually (in my experience) signals that Python
couldn't find some
header files and decided not to compile the _md5 module, however the
tests in the Python's spkg-install script catch this, so I am not sure
how this could happen.

Ondrej

Jaap Spies

unread,
Jan 24, 2012, 6:31:27 PM1/24/12
to sage-s...@googlegroups.com
Ondřej Čertík wrote:
> Hi,
>

Hi Ondrej,

You know! Compile from source.

Good to see you here.

Jaap

Ondřej Čertík

unread,
Jan 25, 2012, 12:46:13 AM1/25/12
to sage-s...@googlegroups.com

Thanksssss Jaap for your helpss. I really appreciate it. All is clear now. :)

Ondrej

William Stein

unread,
Jan 25, 2012, 12:58:01 AM1/25/12
to sage-s...@googlegroups.com
You can rebuild just python with sage -f python.   Or you can install som system-wide ssl related package.  

Thanks for the bug report; our binaries continue to suck, and I hope we find a way to improve.  I know what we should do (have tons of vm's with clean minimal installs), but I haven't found time to make them.

> Ondrej
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Ondřej Čertík

unread,
Jan 25, 2012, 9:35:30 PM1/25/12
to sage-s...@googlegroups.com

Or make Sage work with some "restrict" library, I wrote one here:

https://github.com/certik/restrict

you specify paths that are allowed (like /usr/include/stdio.h) and
everything else
is forbidden. I only tested this on linux.
That should make sure, that things are never picked up from the system
--- if this is the problem.

Ondrej

robin

unread,
Feb 8, 2012, 2:10:16 AM2/8/12
to sage-support

I have the same problem on kubuntu 11.10.

I fixed it with:

sudo apt-get install libssl0.9.8

which worked for me.

best wishes

Robin


On Jan 25, 9:35 pm, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
> On Tue, Jan 24, 2012 at 9:58 PM, William Stein <wst...@gmail.com> wrote:
>
> > On Tuesday, January 24, 2012, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages