Installing Python 2.6.2 on Ubuntu 12.1

Behzad Dastur bdastur at gmail.com
Mon Jul 21 12:36:18 EDT 2014


Question: How to install Python manually and make sure that all the
necessary modules and .so files get built (eg: _sha256.so, zlib.so)



Details:

I am trying to install Python2.6.2 version manually, installation goes
through fine, but later installing setuptools fails due to _sha256 Module
not found.



These are the steps I did for manually installing python in my private
folder:



 1. ./configure --help

 2.  ./configure --prefix=/home/brd/priv_env

 3. make; make install



The installation went through successfully, however I noticed that some of
the _*.so files did not get built under lib/python2.6/lib-dynload/ folder
(eg _sha256.so) , which is likely the reason why my setuptools install
failed due to the error:

"

  File "/home/cisco/priv_env/lib/python2.6/hashlib.py", line 138, in
<module>

    sha224 = __get_builtin_constructor('sha224')

  File "/home/cisco/priv_env/lib/python2.6/hashlib.py", line 66, in
__get_builtin_constructor

    import _sha256

ImportError: No module named _sha256"



Note that I have the necessary libraries installed on this machine eg:
libzlib.so, libssl.so

/usr/lib/x86_64-linux-gnu/libssl.so

/usr/lib/x86_64-linux-gnu/libssl3.so

/usr/lib/x86_64-linux/gnu/libz.so.1




Another note, is that the standard python installation on this system
(Python 2.7.3), does not have this problem, and has all the modules and .so
files built.



Sincere Regards,

Behzad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140721/7c9b1b1b/attachment.html>


More information about the Python-list mailing list