Closed Bug 1478467 Opened 6 years ago Closed 6 years ago

mach talos-test fails to set up virtualenv with system python 2.7 on macOS 10.12: [Errno 1] Operation not permitted

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mstange, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached file full log
My Mac machine is currently not in a state where it can run mach talos.

The creation of the virtualenv fails during the following command:
> /Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py --always-copy /Users/mstange/code/obj-m-opt/testing/talos-venv

The full log is attached. Stack:

> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 2325, in <module>
>   main()
> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 711, in main
>   symlink=options.symlink and hasattr(os, 'symlink')) # MOZ: Make sure we don't use symlink when we don't have it
> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 924, in create_environment
>   site_packages=site_packages, clear=clear, symlink=symlink))
> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 1119, in install_python
>   copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 355, in copyfile
>   copyfileordir(src, dest, symlink)
> File "/Users/mstange/code/mozilla/testing/mozharness/external_tools/virtualenv/virtualenv.py", line 327, in copyfileordir
>   shutil.copytree(src, dest, symlink)
> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
>   raise Error, errors

It throws an error which comes from the copystat call at shutil.py:200 when copying /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/config.c to /Users/mstange/code/obj-m-opt/testing/talos-venv/lib/python2.7/config/config.c.

The problem seems to be the one described in this stack overflow thread: https://stackoverflow.com/questions/46781050/unable-to-setup-virtualenv-with-always-copy-flag-due-to-errno-1

Tentatively blaming on bug 1297515 which made us use --always-copy.

The stack overflow thread said that more modern versions of python do not have this problem. How can I make mach talos use a different version of python?
Summary: mach talos fails to set up virtualenv with system python 2.7 on macOS 10.12: [Errno 1] Operation not permitted → mach talos-test fails to set up virtualenv with system python 2.7 on macOS 10.12: [Errno 1] Operation not permitted
This is no longer happening for me. I recently did "brew install python2", it's possible that that worked around the problem.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: