473,287 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

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

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
Jun 27 '08 #1
2 3745
On May 20, 11:27*am, emallove <ethan.mall...@sun.comwrote:
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
Jun 27 '08 #2
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
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Carsten Gehling | last post by:
I've tried to install pso on my webserver and made the first test example. When trying to run it (eg. from the prompt), I get the following error: Traceback (most recent call last): File...
0
by: Carsten Gehling | last post by:
Figured out myself - I just removed the line with "from url import Url" -it doesn't seem to be used anywhere ;-) - Carsten > -----Oprindelig meddelelse----- > Fra:...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
0
by: M. Lavasani | last post by:
Hi I am trying to test Python-2.3. Any solution for this problem please: >>>gmake test case $MAKEFLAGS in \ *-s*)...
0
by: F. GEIGER | last post by:
py2exe and datetime -> No module named datetime I've begun to use the stdlib module datetime instead of my home brewn classes. Since then a py2exe app doesn't run anymore: Traceback (most...
1
by: ye juan | last post by:
Hi, all I have some questions to ask: 1. How can I add a standard module named "datetime" in Jython when the error happens :"Traceback (innermost last): File "C:\python\test.py", line 3, in...
0
by: Nico Grubert | last post by:
Dear list members, I have installed Python 2.4.3. and PIL 1.1.5. on a Suse Linux 10 64 Bit machine. If I try I get this error: ImportError: No module named _imagingft
4
by: Neefs | last post by:
hi All, i'm using python 2.4, i get the subject error when i try to import a module (in .pyc format). Following are the details of the error: >>> import thegreek Traceback (most recent...
2
by: rajevar | last post by:
hi, i have seen various post related to this topic but i couldnt resolve my issue yet. Im using python version 2.5 on Linux environment this is the error im getting if i try to import zlib ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.