If you have an older version of a module available in the execution 
environment and it is missing the module in question, you might get this 
error since the --onefile compiled executable seems to give it priority.

On Saturday, March 23, 2013 2:34:37 PM UTC-4, dbv wrote:
>
> Environment: virtualenv 1.9.1 under Ubuntu 12.04 with Python 2.7.3, Numpy 
> 1.7.0, Cython 1.8 and PyInstaller 2.0.
>
> One of the project programs has the statement:
>
> import random
>
>
> The PyInstaller (--onedir) generated executable causes the error:
>
> ...
>>   File 
>> "/home/ubuntu/Programs/project_name_pi2/build/pyi.linux2/project_name/out00-PYZ.pyz/tempfile",
>>  
>> line 34, in <module>
>> ImportError: cannot import name Random
>
>
> To account for virtualenv, added both these paths to the .spec pathex:
>
> "/home/ubuntu/ENV/lib/python2.7//", "/usr/lib/python2.7//", ...
>
>
> The ImportError still occurs.
>
> The warnxet.txt includes:
>
> W: no module named random.Random (top-level import by tempfile)
>
>
> Created both a hook-random.py and a hook-random.Random.py but that didn't 
> help either.
>
> Why does this occur and is there a solution?  Thx.
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to