i have an issue when installing scikit-learn, im using python 3.11, and 3.9 it always return same error like
metadata-generation-failed
full error python3.9:
`Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 13
╰─> [166 lines of output]
+ /usr/home/Ranwiesiel/.virtualenvs/ppw39/bin/python /tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/meson.py setup /tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04 /tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/.mesonpy-eeirnzcm -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/.mesonpy-eeirnzcm/meson-python-native-file.ini
Traceback (most recent call last):
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/mesonmain.py", line 188, in run
return options.run_func(options)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/msetup.py", line 363, in run
app.generate()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/msetup.py", line 187, in generate
return self._generate(env, capture, vslite_ctx)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/msetup.py", line 226, in _generate
intr.run()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreter/interpreter.py", line 3023, in run
super().run()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 169, in run
self.evaluate_codeblock(self.ast, start=1)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 201, in evaluate_statement
return self.function_call(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 528, in function_call
res = func(node, func_args, kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 250, in wrapper
return f(*nargs, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 569, in wrapper
return f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreter/interpreter.py", line 2441, in func_subdir
self.evaluate_codeblock(codeblock)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 219, in evaluate_statement
return self.evaluate_if(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 309, in evaluate_if
self.evaluate_codeblock(i.block)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 241, in evaluate_statement
self.evaluate_foreach(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 479, in evaluate_foreach
self.evaluate_codeblock(node.block)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 219, in evaluate_statement
return self.evaluate_if(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 309, in evaluate_if
self.evaluate_codeblock(i.block)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 205, in evaluate_statement
self.assignment(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 642, in assignment
value = self.evaluate_statement(node.value)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 201, in evaluate_statement
return self.function_call(cur)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/interpreterbase.py", line 528, in function_call
res = func(node, func_args, kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 799, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 799, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 799, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
[Previous line repeated 4 more times]
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 98, in wrapped
ret = f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 116, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 250, in wrapper
return f(*nargs, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreterbase/decorators.py", line 569, in wrapper
return f(*wrapped_args, **wrapped_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreter/interpreter.py", line 1799, in func_dependency
d = df.lookup(kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreter/dependencyfallbacks.py", line 355, in lookup
dep = func(kwargs, func_args, func_kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/interpreter/dependencyfallbacks.py", line 87, in _do_dependency
dep = dependencies.find_external_dependency(name, self.environment, kwargs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/dependencies/detect.py", line 114, in find_external_dependency
d = c()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/dependencies/blas_lapack.py", line 882, in __init__
self.detect_sdl()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/dependencies/blas_lapack.py", line 904, in detect_sdl
link_arg = self.clib_compiler.find_library('mkl_rt', self.env, lib_dirs)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/clike.py", line 1179, in find_library
return self._find_library_impl(libname, env, extra_dirs, code, libtype, lib_prefix_warning)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/clike.py", line 1168, in _find_library_impl
value = self._find_library_real(libname, env, extra_dirs, code, libtype, lib_prefix_warning)
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/clike.py", line 1146, in _find_library_real
for d in itertools.chain(extra_dirs, self.get_library_dirs(env, elf_class)):
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/clike.py", line 240, in get_library_dirs
return self._get_library_dirs(env, elf_class).copy()
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/clike.py", line 199, in _get_library_dirs
dirs = self.get_compiler_dirs(env, 'libraries')
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/gnu.py", line 491, in get_compiler_dirs
return self._split_fetch_real_dirs(line.split('=', 1)[1])
File "/tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/vendored-meson/meson/mesonbuild/compilers/mixins/gnu.py", line 474, in _split_fetch_real_dirs
resolved = pobj.resolve(True).as_posix()
File "/usr/local/lib/python3.9/pathlib.py", line 1215, in resolve
s = self._flavour.resolve(self, strict=strict)
File "/usr/local/lib/python3.9/pathlib.py", line 373, in resolve
return _resolve(base, str(path)) or sep
File "/usr/local/lib/python3.9/pathlib.py", line 357, in _resolve
target = accessor.readlink(newpath)
File "/usr/local/lib/python3.9/pathlib.py", line 462, in readlink
return os.readlink(path)
PermissionError: [Errno 13] Permission denied: '/usr'
The Meson build system
Version: 1.4.99
Source dir: /tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04
Build dir: /tmp/pip-install-3_hsun7d/numpy_8ee2f18eb90f458f8ea714e48ecc2f04/.mesonpy-eeirnzcm
Build type: native build
Project name: NumPy
Project version: 2.0.2
C compiler for the host machine: cc (clang 18.1.5 "FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9)")
C linker for the host machine: cc ld.lld 18.1.5
C++ compiler for the host machine: c++ (clang 18.1.5 "FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9)")
C++ linker for the host machine: c++ ld.lld 18.1.5
Cython compiler for the host machine: cython (cython 3.0.11)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (/usr/home/Ranwiesiel/.virtualenvs/ppw39/bin/python)
Found pkg-config: YES (/usr/local/bin/pkg-config) 2.2.0
Run-time dependency python found: YES 3.9
Has header "Python.h" with dependency python-3.9: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
Compiler for C supports arguments -ftrapping-math: YES
Test features "SSE SSE2 SSE3" : Supported
Test features "SSSE3" : Supported
Test features "SSE41" : Supported
Test features "POPCNT" : Supported
Test features "SSE42" : Supported
Test features "AVX" : Supported
Test features "F16C" : Supported
Test features "FMA3" : Supported
Test features "AVX2" : Supported
Test features "AVX512F" : Supported
Test features "AVX512CD" : Supported
Test features "AVX512_KNL" : Supported
Test features "AVX512_KNM" : Unsupported due to Arguments "-msse, -msse2, -msse3, -mssse3, -msse4.1, -mpopcnt, -msse4.2, -mavx, -mf16c, -mfma, -mavx2, -mno-mmx, -mavx512f, -mavx512cd, -mavx512er, -mavx512pf, -mavx5124fmaps, -mavx5124vnniw, -mavx512vpopcntdq" are not supported
Test features "AVX512_SKX" : Supported
Test features "AVX512_CLX" : Supported
Test features "AVX512_CNL" : Supported
Test features "AVX512_ICL" : Supported
Test features "AVX512_SPR" : Unsupported due to Compiler fails against the test code of "AVX512_SPR"
Configuring npy_cpu_dispatch_config.h using configuration
Message:
CPU Optimization Options
baseline:
Requested : min
Enabled : SSE SSE2 SSE3
dispatch:
Requested : max -xop -fma4
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
Library m found: YES
Run-time dependency scipy-openblas found: NO (tried pkgconfig)
ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip
[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.`
python 3.11:
`FAILED: scipy/fft/pocketfft/pypocketfft.cpython-311.so.p/pypocketfft.cxx.o
c++ -Iscipy/fft/pocketfft/pypocketfft.cpython-311.so.p -Iscipy/fft/pocketfft -I../scipy/fft/pocketfft -I../scipy/lib/pocketfft -I/include -I/usr/local/include/python3.11 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -fPIC -pthread -DPOCKETFFT_PTHREADS -DPOCKETFFT_CACHE_SIZE=16 -MD -MQ scipy/fft/pocketfft/pypocketfft.cpython-311.so.p/pypocketfft.cxx.o -MF scipy/fft/pocketfft/pypocketfft.cpython-311.so.p/pypocketfft.cxx.o.d -o scipy/fft/pocketfft/pypocketfft.cpython-311.so.p/pypocketfft.cxx.o -c ../scipy/fft/pocketfft/pypocketfft.cxx
../scipy/fft/pocketfft/pypocketfft.cxx:15:10: fatal error: 'pybind11/pybind11.h' file not found
15 | #include <pybind11/pybind11.h>
| ~~~~~~~~~~~~~~~~~
1 error generated.
[768/1383] Compiling Fortran object scipy/io/test_fortran.cpython-311.so.p/test_fortran.f.o
[769/1383] Generating 'scipy/io/matlab/streams.cpython-311.so.p/streams.c'
[770/1383] Generating 'scipy/stats/rcont/rcont.cpython-311.so.p/rcont.c'
[771/1383] Compiling C object scipy/stats/unuran/unuran_wrapper.cpython-311.so.p/meson-generated_unuran_wrapper.c.o
[772/1383] Compiling C++ object scipy/sparse/sparsetools/sparsetools.cpython-311.so.p/csr.cxx.o
[773/1383] Compiling C++ object scipy/sparse/sparsetools/sparsetools.cpython-311.so.p/bsr.cxx.o
ninja: build stopped: subcommand failed.
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) 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.
full command: /usr/local/bin/python3.11 /usr/home/Ranwiesiel/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_y_t_58p
cwd: /tmp/pip-install-b9f5ljl2/scipy_b56f592389564d6190973138a2318e80
Preparing metadata (pyproject.toml): finished with status 'error'
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
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.
full command: /usr/local/bin/python3.11 /usr/home/Ranwiesiel/.local/lib/python3.11/site-packages/pip/pip-runner.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-qqime3o9/overlay --no-warn-script-location --disable-pip-version-check -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'meson-python>=0.16.0' 'Cython>=3.0.10' 'numpy>=2' 'scipy>=1.6.0'
cwd: [inherit]
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.`
how to solve this? thanks