<div dir="ltr">On Mon, Mar 25, 2013 at 12:51 PM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(80,0,80)">On Mon, Mar 25, 2013 at 4:23 PM, Dinesh B Vadhia </span><span dir="ltr" style="color:rgb(80,0,80)"><<a href="mailto:dineshbvadhia@hotmail.com" target="_blank">dineshbvadhia@hotmail.com</a>></span><span style="color:rgb(80,0,80)"> wrote:</span><br>
<div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="PADDING-LEFT:10px;PADDING-RIGHT:10px;PADDING-TOP:15px" name="Compose message area">
<div><font face="Garamond" size="4">Using PyInstaller, the following error
occurs:</font></div>
<div><font face="Garamond" size="4"></font> </div>
<div><font face="Garamond" size="4">Traceback (most recent call last):<br>
File "<string>", line 9, in <module><br> File
"//usr/lib/python2.7/dist-packages/PIL/Image.py", line 355, in
init<br> __import__(f, globals(), locals(), [])<br> File
"//usr/lib/python2.7/dist-packages/PIL/IptcImagePlugin.py", line 23, in
<module><br> import os, tempfile<br> File
"/usr/lib/python2.7/tempfile.py", line 34, in
<module><br> from random import Random as
_Random<br> File
"//usr/lib/python2.7/dist-packages/numpy/random/__init__.py", line 90, in
<module><br> ranf = random = sample =
random_sample<br>NameError: name 'random_sample' is not defined</font></div>
<div><font face="Garamond" size="4"></font> </div>
<div><font face="Garamond" size="4">Is line 90 in __init.py__ valid?</font></div></div></blockquote><div><br></div></div></div><div>It is. </div></div></div></div></blockquote><div><br></div><div style>In my reading of this the main problem is that `tempfile` is trying to import `random` from the Python standard library but instead is importing the one from within NumPy (i.e., `numpy.random`). I suspect that somehow `sys.path` is being set incorrectly --- perhaps because of the `PYTHONPATH` environment variable.</div>
<div style><br></div><div style>-Brad</div></div></div></div>