<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19403"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT size=4 face=Garamond>@ Ralf.  I missed info.py at the top and it 
is a valid statement.</FONT></DIV>
<DIV><FONT size=4 face=Garamond></FONT> </DIV>
<DIV><FONT size=4 face=Garamond>@ Brad.  My project is using Numpy and 
Scipy and falls over at this point when using PyInstaller.  One of the 
project source files has an "import random" from the Standard Library.  As 
you say, at this point in tempfile.py, it is attempting to "import random" from 
the Standard Library but instead is importing the one from Numpy 
(numpy.random).  </FONT><FONT size=4 face=Garamond>How can this be 
fixed?  Or, is it something for PyInstaller to fix?  Thx.</FONT></DIV>
<DIV><FONT size=4 face=Garamond></FONT> </DIV>
<DIV><FONT size=4 face=Garamond></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=brad.froehle@gmail.com 
href="mailto:brad.froehle@gmail.com">Bradley M. Froehle</A> </DIV>
<DIV><B>Sent:</B> Monday, March 25, 2013 1:26 PM</DIV>
<DIV><B>To:</B> <A 
title="mailto:numpy-discussion@scipy.org CTRL + Click to follow link" 
href="mailto:numpy-discussion@scipy.org">Discussion of Numerical Python</A> 
</DIV>
<DIV><B>Subject:</B> Re: [Numpy-discussion] variables not defined in 
numpy.random__init.py__ ?</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV dir=ltr>On Mon, Mar 25, 2013 at 12:51 PM, Ralf Gommers <SPAN dir=ltr><<A 
title="mailto:ralf.gommers@gmail.com CTRL + Click to follow link" 
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 
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote>
  <DIV dir=ltr><SPAN style="COLOR: rgb(80,0,80)">On Mon, Mar 25, 2013 at 4:23 
  PM, Dinesh B Vadhia </SPAN><SPAN style="COLOR: rgb(80,0,80)" dir=ltr><<A 
  title="mailto:dineshbvadhia@hotmail.com CTRL + Click to follow link" 
  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 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote><U></U>
    <DIV style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
    name="Compose message area">
    <DIV><FONT size=4 face=Garamond>Using PyInstaller, the following error 
    occurs:</FONT></DIV>
    <DIV><FONT size=4 face=Garamond></FONT> </DIV>
    <DIV><FONT size=4 face=Garamond>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 size=4 face=Garamond></FONT> </DIV>
    <DIV><FONT size=4 face=Garamond>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>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><BR></DIV>
<DIV>-Brad</DIV></DIV></DIV></DIV></BODY></HTML>