Skip to content

Install fails on Apple M2 Ventura #297

@oonisim

Description

@oonisim

Environment

$ python3 --version
Python 3.9.13

$ sw_vers
ProductName:		macOS
ProductVersion:		13.0.1
BuildVersion:		22A400

Installation 1

$ python3 -m venv tfx && . ./tfx/bin/activate
$ pip install tensorflow-transform
... (skipping too many lines)
Collecting pyarrow<3,>=1
  Using cached pyarrow-2.0.0.tar.gz (58.9 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [4202 lines of output]
      Ignoring numpy: markers 'python_version < "3.7"' don't match your environment
      Collecting cython>=0.29
        Using cached Cython-0.29.33-py2.py3-none-any.whl (987 kB)
      Collecting numpy==1.16.0
        Using cached numpy-1.16.0.zip (5.1 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting setuptools
        Using cached setuptools-67.4.0-py3-none-any.whl (1.1 MB)
      Collecting setuptools_scm
        Using cached setuptools_scm-7.1.0-py3-none-any.whl (43 kB)
      Collecting wheel
        Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting typing-extensions
        Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
      Collecting tomli>=1.0.0
        Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
      Collecting packaging>=20.0
        Using cached packaging-23.0-py3-none-any.whl (42 kB)
      Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed.
      Installing collected packages: wheel, typing-extensions, tomli, setuptools, packaging, numpy, cython, setuptools_scm
        Running setup.py install for numpy: started
        Running setup.py install for numpy: finished with status 'error'
        error: subprocess-exited-with-error
      
        × Running setup.py install for numpy did not run successfully.
        │ exit code: 1
        ╰─> [4162 lines of output]
            Running from numpy source directory.
      
            Note: if you need reliable uninstall behavior, then install
            with pip instead of using `setup.py install`:
      
              - `pip install .`       (from a git repo or downloaded source
                                       release)
              - `pip install numpy`   (last NumPy release on PyPi)

...
            gcc: numpy/core/src/multiarray/flagsobject.c
            clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
...
            error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/umath -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/npymath -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/takoika/venv/tfx/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/npymath -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/npymath -c numpy/core/src/multiarray/convert.c -o build/temp.macosx-10.9-universal2-3.9/numpy/core/src/multiarray/convert.o -MMD -MF build/temp.macosx-10.9-universal2-3.9/numpy/core/src/multiarray/convert.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> numpy
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
      You should consider upgrading via the '/Users/takoika/venv/tfx/bin/python3 -m pip install --upgrade pip' command.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Installation 2

$ OPENBLAS="$(brew --prefix openblas)" pip install tensorflow_transform
...
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.12.0-py3-none-any.whl (439 kB)
Requirement already satisfied: absl-py<2.0.0,>=0.9 in /Users/takoika/venv/ml/lib/python3.9/site-packages (from tensorflow_transform) (1.3.0)
Collecting apache-beam[gcp]<3,>=2.41
  Using cached apache-beam-2.45.0.zip (3.0 MB)
  Preparing metadata (setup.py) ... done
Collecting tensorflow-metadata<1.13.0,>=1.12.0
  Using cached tensorflow_metadata-1.12.0-py3-none-any.whl (52 kB)
Collecting pyarrow<7,>=6
  Using cached pyarrow-6.0.1-cp39-cp39-macosx_11_0_arm64.whl (13.8 MB)
Requirement already satisfied: protobuf<4,>=3.13 in /Users/takoika/venv/ml/lib/python3.9/site-packages (from tensorflow_transform) (3.19.6)
Requirement already satisfied: pydot<2,>=1.2 in /Users/takoika/venv/ml/lib/python3.9/site-packages (from tensorflow_transform) (1.4.2)
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.11.0-py3-none-any.whl (446 kB)
  Using cached tensorflow_transform-1.10.1-py3-none-any.whl (439 kB)
  Using cached tensorflow_transform-1.10.0-py3-none-any.whl (439 kB)
  Using cached tensorflow_transform-1.9.0-py3-none-any.whl (436 kB)
  Using cached tensorflow_transform-1.8.0-py3-none-any.whl (435 kB)
Collecting pyarrow<6,>=1
  Using cached pyarrow-5.0.0-cp39-cp39-macosx_11_0_arm64.whl (12.3 MB)
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.7.0-py3-none-any.whl (433 kB)
Collecting tensorflow-metadata<1.8.0,>=1.7.0
  Using cached tensorflow_metadata-1.7.0-py3-none-any.whl (48 kB)
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.6.1-py3-none-any.whl (427 kB)
  Using cached tensorflow_transform-1.6.0-py3-none-any.whl (427 kB)
Collecting tensorflow-metadata<1.7.0,>=1.6.0
  Using cached tensorflow_metadata-1.6.0-py3-none-any.whl (48 kB)
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.5.0-py3-none-any.whl (422 kB)
Collecting absl-py<0.13,>=0.9
  Using cached absl_py-0.12.0-py3-none-any.whl (129 kB)
Collecting numpy<1.20,>=1.16
  Using cached numpy-1.19.5.zip (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tensorflow_transform
  Using cached tensorflow_transform-1.4.1-py3-none-any.whl (413 kB)
  Using cached tensorflow_transform-1.4.0-py3-none-any.whl (413 kB)
  Using cached tensorflow_transform-1.3.0-py3-none-any.whl (407 kB)
  Using cached tensorflow_transform-1.2.0-py3-none-any.whl (406 kB)
  Using cached tensorflow_transform-1.1.1-py3-none-any.whl (401 kB)
  Downloading tensorflow_transform-1.1.0-py3-none-any.whl (401 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 401.2/401.2 kB 6.9 MB/s eta 0:00:00
  Downloading tensorflow_transform-1.0.0-py3-none-any.whl (402 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 402.9/402.9 kB 11.2 MB/s eta 0:00:00
Requirement already satisfied: six<2,>=1.12 in /Users/takoika/venv/ml/lib/python3.9/site-packages (from tensorflow_transform) (1.16.0)
  Downloading tensorflow_transform-0.30.0-py3-none-any.whl (398 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 398.7/398.7 kB 7.2 MB/s eta 0:00:00
Collecting tensorflow-metadata<0.31,>=0.30
  Downloading tensorflow_metadata-0.30.0-py3-none-any.whl (47 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.8/47.8 kB 3.6 MB/s eta 0:00:00
Collecting pyarrow<3,>=1
  Using cached pyarrow-2.0.0.tar.gz (58.9 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [6536 lines of output]
      Ignoring numpy: markers 'python_version < "3.7"' don't match your environment
      Collecting cython>=0.29
        Using cached Cython-0.29.33-py2.py3-none-any.whl (987 kB)
      Collecting numpy==1.16.0
        Using cached numpy-1.16.0.zip (5.1 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting setuptools
        Using cached setuptools-67.4.0-py3-none-any.whl (1.1 MB)
      Collecting setuptools_scm
        Using cached setuptools_scm-7.1.0-py3-none-any.whl (43 kB)
      Collecting wheel
        Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting typing-extensions
        Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
      Collecting packaging>=20.0
        Using cached packaging-23.0-py3-none-any.whl (42 kB)
      Collecting tomli>=1.0.0
        Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
      Building wheels for collected packages: numpy
        Building wheel for numpy (setup.py): started
        Building wheel for numpy (setup.py): finished with status 'error'
        error: subprocess-exited-with-error
      
        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [6114 lines of output]
            Running from numpy source directory.
            /private/var/folders/_4/8v285hqs45xfzk0l1nlr3yq40000gn/T/pip-install-mqqkj7nw/numpy_fb4228ef9b4f4de5a81a9e9f13289377/numpy/distutils/misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?

...
error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/takoika/venv/ml/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/npymath -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.9/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.macosx-10.9-universal2-3.9/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.macosx-10.9-universal2-3.9/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> numpy
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

Tensorflow

TensorFlow can be installed.

import tensorflow as tf
print("TensorFlow version: {}".format(tf.__version__))
print("Keras version: {}".format(tf.keras.__version__))
---
TensorFlow version: 2.10.0
Keras version: 2.10.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions