Another Japan in the World

Jun Aruga's blog, who lived in Japan, Singapore, live in Czech Republic. Mainly about IT and travel.

Install Python 2.7.13 from source on Mac

Continuing from previous article.

$ cd ~/hg/cpython

Check latest version in v2.x. v2.7.13 is latest version for that.

$ hg tags | grep 'v2\.7'

Below command hg update -r something is like a git checkout something.

$ hg update -r v2.7.13
3157 files updated, 0 files merged, 190 files removed, 0 files unresolved

$ head -1 README
This is Python version 2.7.13
$ ./configure --prefix=/usr/local/python-2.7.13 --with-pydebug

$ make -j
Python build finished, but the necessary bits to build these modules were not found:
_bsddb             dl                 imageop
linuxaudiodev      ossaudiodev        readline
spwd               sunaudiodev
To find the necessary bits, look in in detect_modules() for the module's name.

I found a document to be helpful. [1]

$ make test
365 tests OK.
1 test failed:
1 test altered the execution environment:
34 tests skipped:
    test_al test_bsddb test_bsddb3 test_cd test_cl test_codecmaps_cn
    test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
    test_codecmaps_tw test_curses test_dl test_epoll test_gl
    test_imageop test_imgfile test_largefile test_linuxaudiodev
    test_msilib test_ossaudiodev test_readline test_smtpnet
    test_socketserver test_spwd test_startfile test_sunaudiodev
    test_timeout test_tk test_ttk_guionly test_urllib2net
    test_urllibnet test_winreg test_winsound test_zipfile64
3 skips unexpected on darwin:
    test_dl test_readline test_spwd
[1035705 refs]
make: *** [test] Error 1