Closed Bug 1487490 Opened 6 years ago Closed 5 years ago

"brew install python3" failing since Python is already installed

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Desktop
macOS
defect
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: osmose, Assigned: standard8)

References

Details

Attachments

(1 file)

When trying to run `./mach bootstrap` to set up for a non-artifact Firefox Desktop build, I get the following error:

```
Error: python 2.7.13_1 is already installed
To upgrade to 3.7.0, run `brew upgrade python`
Error running mach:

    ['bootstrap']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

CalledProcessError: Command '[u'/usr/local/bin/brew', u'install', u'python3']' returned non-zero exit status 1

  File "/Users/osmose/Projects/mozilla-unified/python/mozboot/mozboot/mach_commands.py", line 38, in bootstrap
    bootstrapper.bootstrap()
  File "/Users/osmose/Projects/mozilla-unified/python/mozboot/mozboot/bootstrap.py", line 369, in bootstrap
    self.instance.install_system_packages()
  File "/Users/osmose/Projects/mozilla-unified/python/mozboot/mozboot/osx.py", line 193, in install_system_packages
    getattr(self, 'ensure_%s_system_packages' % self.package_manager)()
  File "/Users/osmose/Projects/mozilla-unified/python/mozboot/mozboot/osx.py", line 346, in ensure_homebrew_system_packages
    self._ensure_homebrew_packages(packages)
  File "/Users/osmose/Projects/mozilla-unified/python/mozboot/mozboot/osx.py", line 315, in _ensure_homebrew_packages
    subprocess.check_call(cmd + ['install', package])
  File "/Users/osmose/.pyenv/versions/2.7.15/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
```

It seems like python3 is now an alias for the python package[1] and the python3 command is only installed if you install it as `python@3`. Maybe we need to be running `brew install python@3` instead?

[1] https://discourse.brew.sh/t/python-and-pep-394/1813/4
OS: Unspecified → Mac OS X
Hardware: Unspecified → Desktop
I hit this as well, in my case I already had python3:

Error: python 3.6.4_4 is already installed
To upgrade to 3.7.0, run `brew upgrade python`
Even on patchlevel version bumps:

Error: python 3.7.0 is already installed
To upgrade to 3.7.1, run `brew upgrade python`

The latest is that "python" is now python3 and python 2 is installed via "python@2", so I think we just need to update the list in osx.py to accommodate that.

Assignee: nobody → standard8
Status: NEW → ASSIGNED
Attachment #9036848 - Attachment description: Bug 1487490 - Update the python modules installed on OS X by bootstrap, following changes in homebrew. r?#firefox-build-system-reviewers → Bug 1487490 - Update the python modules installed on OS X by bootstrap, following changes in homebrew.
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ff6b83e35216
Update the python modules installed on OS X by bootstrap, following changes in homebrew. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

Thank you for fixing this!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: