Unable to install Sckikitt-learn version 1.0.2 in rocky linux 8 #28224
-
I am able to install version 1.3.0 and 1.4.0 but unable to install 1.0.2 version. Error emssage ins below > Collecting scikit-learn==1.0.2
> Using cached scikit-learn-1.0.2.tar.gz (6.7 MB)
> Installing build dependencies ... done
> Getting requirements to build wheel ... done
> Preparing metadata (pyproject.toml) ... error
> error: subprocess-exited-with-error
> × Preparing metadata (pyproject.toml) did not run successfully.
> │ exit code: 1
> ╰─> [1500 lines of output]
> Partial import of sklearn during the build process.
> setup.py:128: DeprecationWarning:
> `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
> of the deprecation of `distutils` itself. It will be removed for
> Python >= 3.12. For older Python versions it will remain present.
> It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
from numpy.distutils.command.build_ext import build_ext # noqa
INFO: C compiler: gcc -pthread -B /home/cdimapasok@sladmin.com/anaconda3/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/cdimapasok@sladmin.com/anaconda3/include -fPIC -O2 -isystem /home/cdimapasok@sladmin.com/anaconda3/include -fPIC
INFO: compile options: '-c'
INFO: gcc: test_program.c
INFO: gcc -pthread -B /home/cdimapasok@sladmin.com/anaconda3/compiler_compat objects/test_program.o -o test_program
INFO: C compiler: gcc -pthread -B /home/cdimapasok@sladmin.com/anaconda3/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/cdimapasok@sladmin.com/anaconda3/include -fPIC -O2 -isystem /home/cdimapasok@sladmin.com/anaconda3/include -fPIC
INFO: compile options: '-c'
extra options: '-fopenmp'
INFO: gcc: test_program.c
INFO: gcc -pthread -B /home/cdimapasok@sladmin.com/anaconda3/compiler_compat objects/test_program.o -o test_program -fopenmp
/home/cdimapasok@sladmin.com/anaconda3/compiler_compat/ld: warning: libdl.so.2, needed by /usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so, not found (try using -rpath or -rpath-link)
/home/cdimapasok@sladmin.com/anaconda3/compiler_compat/ld: /usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so: undefined reference to `dlopen@GLIBC_2.2.5'
/home/cdimapasok@sladmin.com/anaconda3/compiler_compat/ld: /usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so: undefined reference to `dlerror@GLIBC_2.2.5'
/home/cdimapasok@sladmin.com/anaconda3/compiler_compat/ld: /usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so: undefined reference to `dlclose@GLIBC_2.2.5'
/home/cdimapasok@sladmin.com/anaconda3/compiler_compat/ld: /usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so: undefined reference to `dlsym@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
/tmp/pip-install-atgmr56p/scikit-learn_3c52074ecfab4ceebc78db2af6c77d7c/sklearn/_build_utils/openmp_helpers.py:127: UserWarning:
***********
* WARNING *
***********
It seems that scikit-learn cannot be built with OpenMP.
- Make sure you have followed the installation instructions:
https://scikit-learn.org/dev/developers/advanced_installation.html
- If your compiler supports OpenMP but you still see this
message, please submit a bug report at:
https://github.com/scikit-learn/scikit-learn/issues
- The build will continue with OpenMP-based parallelism
disabled. Note however that some estimators will run in
sequential mode instead of leveraging thread-based
parallelism. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't see which version of python you have but I see that You risk to have the same issue with NumPy. So I would recommend to create an environment with at most Python 3.10 if you intend to install scikit-learn without building from source. |
Beta Was this translation helpful? Give feedback.
I don't see which version of python you have but I see that
pip
tries to build from source instead of fetching a wheel from PyPI. I would think that your version ofPython
is too recent and there is no wheel available on. On PyPI, the wheel available are for Python 3.7, 3.8. 3.9, and 3.10.You risk to have the same issue with NumPy. So I would recommend to create an environment with at most Python 3.10 if you intend to install scikit-learn without building from source.