Try putting env={} in subprocess

For MacOS (and probably Linux if it were running through Freeze or the like), 
you need to pass env as an empty dict. For Windows and py2exe, you pass env as 
None.


I don't know if this post will get through as I'm not intending to subscribe to 
this list, but I thought I'd try sending an answer as I came across your post.

Cheers,
Mike

On Tue, Jan 11, 2011 at 9:42 AM, Mier, Alejandro <alej...@ti.com
> wrote:


> Hello
>
> I have a script that installs Python, and then installs some modules with:
>
> subprocess.call("python setup.py install")
>
> The script works on Windows with py2exe, but gives me this error when using
> py2app:
>
> File setup.py
>    from distutils.core import setup
> ImportError: No module named distutils.core
>
> I tried explicitly including distutils when building the .app bundle, with
> python setup.py py2app --packages distutils (and several variations of
> --includes), but then I get this error:
>
> error: invalid command 'install'
>
> What do I need to do to make this work on mac?
>
> Thanks!
> _______________________________________________
> Pythonmac-SIG maillist  -  pyth...@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>


      
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to