Closed Bug 1607470 Opened 5 years ago Closed 5 years ago

virtualenvs broken by referencing non-virtualenv python executable on macos, mach doc, __PYVENV_LAUNCHER__

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: Pike, Assigned: Pike)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Right now I'm stuck trying to get mach doc to launch.

I've drilled down to __PYVENV_LAUNCHER__ being set to /usr/local/bin/python3 being the culprit when we subprocess out to pip.

Probably the sanest fix is to pass a dedicated environment?

https://stackoverflow.com/questions/26323852/whats-the-meaning-of-pyvenv-launcher-environment-variable links to a couple of other notable posts.

Marking as mach-busted, as I think it is.

Pike, what's the symptom / error messages that you're seeing? I'm having issues doing mach build which I suspect could be related to this, and I'd love to understand more.

Attached file ./mach doc output

This is the output I get, the trigger is that pipenv install fails to execute pipenv, as it does so in a python interpreter that's not the virtualenv one, per the leading #!

The PYVENV_LAUNCHER is set on macos to indicate which
python to use. Sadly, keeping this set confuses pip in
virtualenvs.
This corresponds to https://github.com/python/cpython/pull/9516.

Assignee: nobody → l10n
Status: NEW → ASSIGNED

dmose, does this patch improve things for you?

I ended up figuring out that my particular problem had something to do with the way my homebrew setup had evolved, and no amount of uninstalling and reinstalling various versions of python would fix it. I finally simply uninstalled homebrew entirely and started over. That fixed my problem. :-/

Pushed by axel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed91bca1f4a6 unset __PYVENV_LAUNCHER__ for virtualenvs, r=firefox-build-system-reviewers,rstewart
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: