I will paste my terminal output, it appears to be an error identifying my architecture. I am on an intel x64 if it helps, mac model is from 2011. Sorry for the bad formatting
Ryans-MBP:~ $ pip install opencv-python
Collecting opencv-python
Using cached opencv-python-4.6.0.66.tar.gz (90.3 MB)
Installing build dependencies … error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [210 lines of output]
Ignoring numpy: markers ‘python_version == “3.6” and platform_machine != “aarch64” and platform_machine != “arm64”’ don’t match your environment
Ignoring numpy: markers ‘python_version == “3.7” and platform_machine != “aarch64” and platform_machine != “arm64”’ don’t match your environment
Ignoring numpy: markers ‘python_version == “3.8” and platform_machine != “aarch64” and platform_machine != “arm64”’ don’t match your environment
Ignoring numpy: markers ‘python_version <= “3.9” and sys_platform == “linux” and platform_machine == “aarch64”’ don’t match your environment
Ignoring numpy: markers ‘python_version <= “3.9” and sys_platform == “darwin” and platform_machine == “arm64”’ don’t match your environment
Ignoring numpy: markers ‘python_version == “3.9” and platform_machine != “aarch64” and platform_machine != “arm64”’ don’t match your environment
Collecting setuptools==59.2.0
Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
Collecting wheel==0.37.0
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting cmake>=3.1
Using cached cmake-3.24.1.1-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (77.9 MB)
Collecting pip
Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
Collecting scikit-build>=0.13.2
Using cached scikit_build-0.15.0-py2.py3-none-any.whl (77 kB)
Collecting numpy==1.21.2
Using cached numpy-1.21.2.zip (10.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status ‘done’
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status ‘done’
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting distro
Using cached distro-1.7.0-py3-none-any.whl (20 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (pyproject.toml): started
Building wheel for numpy (pyproject.toml): finished with status ‘error’
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [166 lines of output]
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(
Running from numpy source directory.
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_common.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_pcg64.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_sfc64.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/mtrand.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
libraries blis not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
accelerate_info:
libraries accelerate not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
Library accelerate was not found. Ignoring
libraries veclib not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
Library veclib was not found. Ignoring
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
flame_info:
libraries flame not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/lib']
NOT AVAILABLE
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
Warning: attempted relative import with no known parent package
/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build/src.macosx-10.9-universal2-3.10
creating build/src.macosx-10.9-universal2-3.10/numpy
creating build/src.macosx-10.9-universal2-3.10/numpy/distutils
building library "npymath" sources
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable f90
Could not locate executable f77
Could not locate executable xlf90
Could not locate executable xlf
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
creating build/src.macosx-10.9-universal2-3.10/numpy/core
creating build/src.macosx-10.9-universal2-3.10/numpy/core/src
creating build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath
conv_template:> build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath/npy_math_internal.h
adding 'build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath' to include_dirs.
conv_template:> build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath/ieee754.c
conv_template:> build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath/npy_math_complex.c
None - nothing done with h_files = ['build/src.macosx-10.9-universal2-3.10/numpy/core/src/npymath/npy_math_internal.h']
building library "npyrandom" sources
building extension "numpy.core._multiarray_tests" sources
creating build/src.macosx-10.9-universal2-3.10/numpy/core/src/multiarray
conv_template:> build/src.macosx-10.9-universal2-3.10/numpy/core/src/multiarray/_multiarray_tests.c
building extension "numpy.core._multiarray_umath" sources
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 211, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 448, in <module>
setup_package()
File "setup.py", line 440, in setup_package
setup(**metadata)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
dist.run_commands()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/command/build.py", line 61, in run
old_build.run(self)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-build-env-_xw8ilrb/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/command/build_src.py", line 144, in run
self.build_sources()
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/command/build_src.py", line 161, in build_sources
self.build_extension_sources(ext)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/command/build_src.py", line 318, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/private/var/folders/8d/qsxnxl9d7lg0w77_spf5gb2m0000gn/T/pip-install-dfi9c6bi/numpy_0373063135f64f919ec7c50c6a55f228/numpy/distutils/command/build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 434, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 44, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 289, in check_types
raise SystemError(
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[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.
Ryans-MBP:~ $