[Pythonmac-SIG] py2app -A and virtual environments

Ronald Oussoren ronaldoussoren at mac.com
Fri Sep 28 07:08:07 EDT 2018



> On 28 Sep 2018, at 10:34, Just van Rossum <justvanrossum at gmail.com> wrote:
> 
> Following up to this: it seems line 1832 in py2app/build_app.py isn’t correct anymore, with Python 3 venv behavior:
> 
>        if os.path.exists(os.path.join(sys.prefix, ".Python")):
> 
> Not sure how to fix it. If I force this code path to be taken, I get an AttributeError on sys.real_prefix, so I guess a bit more needs to be done.

The line of code is for virtualenv support. I’ll have to check the code to see what’s needed to support venv here as well.

Ronald

> 
> Just
> 
>> On 27 Sep 2018, at 16:05, Just van Rossum <justvanrossum at gmail.com> wrote:
>> 
>> Hi all,
>> 
>> py2app seems to do the right thing from an activated virtual env when building a full app. However, for speedy development I use the py2app -A option a lot, and when running such an alias bundle it appears to use the global Python install instead of the virtual env. Is there a way around that?
>> 
>> Just
>> 
> 



More information about the Pythonmac-SIG mailing list