gftools: M1 macOS 11 `pip3 install gftools` ERROR: Failed building wheel for skia-pathops

In a Python3 v3.9.7 venv on macOS 11.6, pip3 install gftools gives me the following error:

Building wheels for collected packages: skia-pathops
  Building wheel for skia-pathops (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/eli/Py/venvs/python3-venv-google-fonts/bin/python3.9 /Users/eli/Py/venvs/python3-venv-google-fonts/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/tmp4tvbvn5n
       cwd: /private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-cjfqiauh/skia-pathops_3d621440abbc4b908cd5741974c46ed7
  Complete output (84 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11-arm64-3.9
  creating build/lib.macosx-11-arm64-3.9/pathops
  copying src/python/pathops/_version.py -> build/lib.macosx-11-arm64-3.9/pathops
  copying src/python/pathops/__init__.py -> build/lib.macosx-11-arm64-3.9/pathops
  copying src/python/pathops/operations.py -> build/lib.macosx-11-arm64-3.9/pathops
  running build_ext
  building 'pathops._pathops' extension
  creating build/temp.macosx-11-arm64-3.9
  creating build/temp.macosx-11-arm64-3.9/src
  creating build/temp.macosx-11-arm64-3.9/src/python
  creating build/temp.macosx-11-arm64-3.9/src/python/pathops
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -Isrc/cpp/skia-builder/skia -Isrc/cpp/skia-builder/skia/src -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/Users/eli/Py/venvs/python3-venv-google-fonts/include -I/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/python/pathops/_pathops.cpp -o build/temp.macosx-11-arm64-3.9/src/python/pathops/_pathops.o -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.9
  building 'skia' library
  New python executable in /private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-cjfqiauh/skia-pathops_3d621440abbc4b908cd5741974c46ed7/build/temp.macosx-11-arm64-3.9/src/cpp/skia-builder/skia/venv2/bin/python
  ERROR: The executable /private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-cjfqiauh/skia-pathops_3d621440abbc4b908cd5741974c46ed7/build/temp.macosx-11-arm64-3.9/src/cpp/skia-builder/skia/venv2/bin/python is not functioning
  ERROR: It thinks sys.prefix is '/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-cjfqiauh/skia-pathops_3d621440abbc4b908cd5741974c46ed7' (should be u'/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-cjfqiauh/skia-pathops_3d621440abbc4b908cd5741974c46ed7/build/temp.macosx-11-arm64-3.9/src/cpp/skia-builder/skia/venv2')
  ERROR: virtualenv is not compatible with this system or executable
  Downloading https://files.pythonhosted.org/packages/59/38/55dd25a965990bd93f77eb765b189e72cf581ce1c2de651cb7b1dea74ed1/virtualenv-16.2.0.tar.gz
  Done.
  failed to create virtualenv
  Traceback (most recent call last):
    File "/Users/eli/Py/venvs/python3-venv-google-fonts/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/Users/eli/Py/venvs/python3-venv-google-fonts/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/eli/Py/venvs/python3-venv-google-fonts/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 248, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 221, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 207, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 367, in <module>
      setup(**setup_params)
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 216, in run
      build_ext.run(self)
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-build-env-lsiv4ckc/overlay/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "setup.py", line 194, in build_extension
      libraries=self.get_libraries(ext),
    File "setup.py", line 210, in get_libraries
      library_dir = self._library_builders[library](self.build_temp)
    File "setup.py", line 269, in build_skia
      subprocess.run(build_cmd, check=True, env=env)
    File "/opt/homebrew/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['python2', 'src/cpp/skia-builder/build_skia.py', 'build/temp.macosx-11-arm64-3.9/src/cpp/skia-builder/skia']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for skia-pathops
Failed to build skia-pathops
ERROR: Could not build wheels for skia-pathops which use PEP 517 and cannot be installed directly

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (18 by maintainers)

Most upvoted comments

Thank you @anthrotype ! This is huge, it looks like all the GF CLI tools work on M1 now!

I was able to install gftools after pip install --upgrade skia-pathops

I have just released skia-pathops v0.7.0 which should finally work with M1 Macs. Please pip install --upgrade skia-pathops, test and and let me know if it’s working!

So, standard troubleshooting advice. Step one, get more information:

  • Try running with --progress
  • Try running with -v

Step two, change the parameters and see which makes a difference:

  • Does it still happen without the --recursive option?
  • Does it still happen with --depth 1 --shallow-submodules?
  • Does it still happen on a different network?
  • Does it still happen on a different machine on the same network?
  • Does it still happen on a different operating system (Linux virtual machine on the same computer)?
  • Does it still happen with wired instead of wireless, or vice versa?