Python in non-standard location erring with "No module named _sha256"

Discussion in 'Python' started by emallove, May 20, 2008.

  1. emallove

    emallove Guest

    I'm running into the below "No modules named _sha256" issue, with a
    python installed in a non-standard location.

    $ python
    Python 2.5.2 (r252:60911, May 20 2008, 09:46:50)
    [GCC 3.3.3 (SuSE Linux)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import md5

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/ws/ompi-tools/lib/python2.5/md5.py", line 6, in <module>
    from hashlib import md5
    File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 135, in
    <module>
    sha224 = __get_builtin_constructor('sha224')
    File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 63, in
    __get_builtin_constructor
    import _sha256
    ImportError: No module named _sha256

    Googling around, this seems to be related to OpenSSL being in a non-
    standard location? I've edited the Setup file to set $(SSL) to the non-
    standard location. Now Python compiles fine, but I still get the above
    error.

    Any help would be much appreciated.

    Thanks,
    Ethan
     
    emallove, May 20, 2008
    #1
    1. Advertising

  2. emallove

    emallove Guest

    Re: Python in non-standard location erring with "No module named_sha256"

    On May 20, 11:27 am, emallove <> wrote:
    > I'm running into the below "No modules named _sha256" issue, with a
    > python installed in a non-standard location.
    >
    > $ python
    > Python 2.5.2 (r252:60911, May 20 2008, 09:46:50)
    > [GCC 3.3.3 (SuSE Linux)] on linux2
    > Type "help", "copyright", "credits" or "license" for more information.>>> import md5
    >
    > Traceback (most recent call last):
    >   File "<stdin>", line 1, in <module>
    >   File "/ws/ompi-tools/lib/python2.5/md5.py", line 6, in <module>
    >     from hashlib import md5
    >   File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 135, in
    > <module>
    >     sha224 = __get_builtin_constructor('sha224')
    >   File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 63, in
    > __get_builtin_constructor
    >     import _sha256
    > ImportError: No module named _sha256
    >
    > Googling around, this seems to be related to OpenSSL being in a non-
    > standard location? I've edited the Setup file to set $(SSL) to the non-
    > standard location. Now Python compiles fine, but I still get the above
    > error.
    >
    > Any help would be much appreciated.
    >
    > Thanks,
    > Ethan


    One solution was to just use Python 2.3.7 (instead of 2.5).

    -Ethan
     
    emallove, May 20, 2008
    #2
    1. Advertising

  3. Maybe you run the configure, make, make install without addind devel
    packages on your system. I mean:

    openssl-devel
    readline-devel
    ....

    Regards,

    emallove wrote:

    > I'm running into the below "No modules named _sha256" issue, with a
    > python installed in a non-standard location.
    >
    > $ python
    > Python 2.5.2 (r252:60911, May 20 2008, 09:46:50)
    > [GCC 3.3.3 (SuSE Linux)] on linux2
    > Type "help", "copyright", "credits" or "license" for more information.
    >>>> import md5

    > Traceback (most recent call last):
    > File "<stdin>", line 1, in <module>
    > File "/ws/ompi-tools/lib/python2.5/md5.py", line 6, in <module>
    > from hashlib import md5
    > File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 135, in
    > <module>
    > sha224 = __get_builtin_constructor('sha224')
    > File "/ws/ompi-tools/lib/python2.5/hashlib.py", line 63, in
    > __get_builtin_constructor
    > import _sha256
    > ImportError: No module named _sha256
    >
    > Googling around, this seems to be related to OpenSSL being in a non-
    > standard location? I've edited the Setup file to set $(SSL) to the non-
    > standard location. Now Python compiles fine, but I still get the above
    > error.
    >
    > Any help would be much appreciated.
    >
    > Thanks,
    > Ethan
     
    Laurent Rahuel, May 21, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Dalessandro
    Replies:
    0
    Views:
    629
    Luke Dalessandro
    Jan 15, 2006
  2. zxo102
    Replies:
    0
    Views:
    439
    zxo102
    Aug 1, 2006
  3. Shane
    Replies:
    2
    Views:
    165
    Shane
    Oct 17, 2011
  4. Shane
    Replies:
    4
    Views:
    182
    Steven D'Aprano
    Oct 21, 2011
  5. Carl Youngblood
    Replies:
    1
    Views:
    247
    Carl Youngblood
    Apr 9, 2005
Loading...

Share This Page