You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mach_bootstrap.py may find system pip before virtualenv copy #8968
Likely happens since 1a9263c. Also reported by @Yoric for OS X (MacPorts). To work around one may need to alter search order in PIP_NAMES e.g., prefer pip2.7 before pip-2.7.
changed the title [-]mach may find system pip before virtualenv copy[/-][+]mach_bootstrap.py may find system pip before virtualenv copy[/+]on Dec 14, 2015
I believe this issue might be related to #10595. If the 'quote' kicks in for any reason (it is no-op most of the time), the virtualenv fails to activate - meaning the search path for executing binaries is not updated correctly.
Since the virtualenv is already active at this point (assuming another bug hasn't prevented activation), I think it should be safe to replace pip = _get_exec(*PIP_NAMES) with just pip = find_executable("pip"). This solved the issue on my machine, but there may be edge cases I'm not considering.
(which I think will also work in Windows, but might need checks for .bat/.cmd extensions).
This can then be used for an installation test combined with upgrading, like this:
{pip_path} install -U "pip>8" setuptools wheel # pinning all versions CAN be a good idea, if they're maintained
Please also note that sometimes an old distribute an cause trouble, and maybe should be uninstalled after the upgrade. Adding --log is also a good idea to ease diagnostics of any problems.
I ran into this issue before but I think I don't any more. Is there a simple way to test other than running the steps above (which worked fine for me)?
Activity
[-]mach may find system pip before virtualenv copy[/-][+]mach_bootstrap.py may find system pip before virtualenv copy[/+]jbeich commentedon Dec 14, 2015
Also tracking downstream for FreeBSD.
frewsxcv commentedon Dec 14, 2015
Relevant issue that prompted that commit: #7784
zbynekwinkler commentedon Apr 14, 2016
I believe this issue might be related to #10595. If the 'quote' kicks in for any reason (it is no-op most of the time), the virtualenv fails to activate - meaning the search path for executing binaries is not updated correctly.
campaul commentedon May 11, 2016
Since the virtualenv is already active at this point (assuming another bug hasn't prevented activation), I think it should be safe to replace
pip = _get_exec(*PIP_NAMES)with justpip = find_executable("pip"). This solved the issue on my machine, but there may be edge cases I'm not considering.jhermann commentedon Jul 1, 2016
For a more robust way and skipping the in-script virtualenv activation (which is tricky at best), you could also do this:
(which I think will also work in Windows, but might need checks for .bat/.cmd extensions).
This can then be used for an installation test combined with upgrading, like this:
Please also note that sometimes an old
distributean cause trouble, and maybe should be uninstalled after the upgrade. Adding--logis also a good idea to ease diagnostics of any problems.piaoger commentedon Aug 30, 2016
thanks @campaul , I can build servo on my mac successfully by using your solution.
genodeftest commentedon Nov 4, 2016
I ran into this issue before but I think I don't any more. Is there a simple way to test other than running the steps above (which worked fine for me)?
genodeftest commentedon Nov 4, 2016
Works fine for me.