scikit-learn-contrib / lightning

Large-scale linear classification, regression and ranking in Python
https://contrib.scikit-learn.org/lightning/
1.73k stars 214 forks source link

Add support for Python 3.10 #188

Closed StrikerRUS closed 2 years ago

StrikerRUS commented 2 years ago

Building scikit-learn from sources doesn't work for Windows. There is a

long log ``` Collecting scikit-learn Downloading scikit-learn-1.0.1.tar.gz (6.6 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 'error' ERROR: Command errored out with exit status 1: command: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp6coo4zsn' cwd: C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_a886946a27414c489b1d781f7aac08cf Complete output (71 lines): Partial import of sklearn during the build process. C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:528: UserWarning: Fallback spawn triggered. Please update distutils monkeypatch. warnings.warn( Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 522, in _fallback_spawn yield bag File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 510, in spawn return super().spawn(cmd, env=env) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 88, in m = lambda self, *args, **kw: func(self, *args, **kw) TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 501, in link self.spawn([self.linker] + ld_args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 509, in spawn with self._fallback_spawn(cmd, env) as fallback: File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 531, in _fallback_spawn bag.value = super().spawn(cmd) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 88, in m = lambda self, *args, **kw: func(self, *args, **kw) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 171, in CCompiler_spawn raise DistutilsExecError('Command "%s" failed with exit status %d%s' % distutils.errors.DistutilsExecError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in main() File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 319, in setup_package() File "setup.py", line 315, in setup_package setup(**metadata) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "setup.py", line 201, in configuration config.add_subpackage("sklearn") File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1016, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 982, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 924, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "sklearn\setup.py", line 85, in configuration cythonize_extensions(top_path, config) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_a886946a27414c489b1d781f7aac08cf\sklearn\_build_utils\__init__.py", line 47, in cythonize_extensions basic_check_build() File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_a886946a27414c489b1d781f7aac08cf\sklearn\_build_utils\pre_build_helpers.py", line 113, in basic_check_build compile_test_program(code) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_a886946a27414c489b1d781f7aac08cf\sklearn\_build_utils\pre_build_helpers.py", line 76, in compile_test_program ccompiler.link_executable( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 731, in link_executable self.link(CCompiler.EXECUTABLE, objects, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-3vn4pl57\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 503, in link raise LinkError(msg) distutils.errors.LinkError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/62/7c/596ff7b32f655f379d3abdfa82607e5cb3b70f46baad4604706511cfeb85/scikit-learn-1.0.1.tar.gz#sha256=ac2ca9dbb754d61cfe1c83ba8483498ef951d29b93ec09d6f002847f210a99da (from https://pypi.org/simple/scikit-learn/) (requires-python:>=3.7). Command errored out with exit status 1: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp6coo4zsn' Check the logs for full command output. Downloading scikit-learn-1.0.tar.gz (7.8 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 'error' ERROR: Command errored out with exit status 1: command: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpdh905uxu' cwd: C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_89518423bd084348a3c43e112cb18bae Complete output (71 lines): Partial import of sklearn during the build process. C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:528: UserWarning: Fallback spawn triggered. Please update distutils monkeypatch. warnings.warn( Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 522, in _fallback_spawn yield bag File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 510, in spawn return super().spawn(cmd, env=env) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 88, in m = lambda self, *args, **kw: func(self, *args, **kw) TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 501, in link self.spawn([self.linker] + ld_args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 509, in spawn with self._fallback_spawn(cmd, env) as fallback: File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 531, in _fallback_spawn bag.value = super().spawn(cmd) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 88, in m = lambda self, *args, **kw: func(self, *args, **kw) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 171, in CCompiler_spawn raise DistutilsExecError('Command "%s" failed with exit status %d%s' % distutils.errors.DistutilsExecError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in main() File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 319, in setup_package() File "setup.py", line 315, in setup_package setup(**metadata) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "setup.py", line 201, in configuration config.add_subpackage("sklearn") File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1016, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 982, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 924, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "sklearn\setup.py", line 85, in configuration cythonize_extensions(top_path, config) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_89518423bd084348a3c43e112cb18bae\sklearn\_build_utils\__init__.py", line 47, in cythonize_extensions basic_check_build() File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_89518423bd084348a3c43e112cb18bae\sklearn\_build_utils\pre_build_helpers.py", line 113, in basic_check_build compile_test_program(code) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_89518423bd084348a3c43e112cb18bae\sklearn\_build_utils\pre_build_helpers.py", line 76, in compile_test_program ccompiler.link_executable( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 731, in link_executable self.link(CCompiler.EXECUTABLE, objects, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-cnf6gl5e\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 503, in link raise LinkError(msg) distutils.errors.LinkError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/e1/4d/15c3542a17eebf61e48bd71dc55b5f3b5031f1cd0dc4aad1ff9ac9651e49/scikit-learn-1.0.tar.gz#sha256=776800194e757cd212b47cd05907e0eb67a554ad333fe76776060dbb729e3427 (from https://pypi.org/simple/scikit-learn/) (requires-python:>=3.7). Command errored out with exit status 1: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpdh905uxu' Check the logs for full command output. Downloading scikit-learn-0.24.2.tar.gz (7.5 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 'error' ERROR: Command errored out with exit status 1: command: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpoo58vjfu' cwd: C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_610a6acc211a4cb981ab5e8489eadc59 Complete output (71 lines): Partial import of sklearn during the build process. C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:528: UserWarning: Fallback spawn triggered. Please update distutils monkeypatch. warnings.warn( Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 522, in _fallback_spawn yield bag File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 510, in spawn return super().spawn(cmd, env=env) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 89, in m = lambda self, *args, **kw: func(self, *args, **kw) TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 501, in link self.spawn([self.linker] + ld_args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 509, in spawn with self._fallback_spawn(cmd, env) as fallback: File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 531, in _fallback_spawn bag.value = super().spawn(cmd) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 89, in m = lambda self, *args, **kw: func(self, *args, **kw) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 178, in CCompiler_spawn raise DistutilsExecError('Command "%s" failed with exit status %d%s' % distutils.errors.DistutilsExecError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in main() File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 301, in setup_package() File "setup.py", line 297, in setup_package setup(**metadata) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "setup.py", line 188, in configuration config.add_subpackage('sklearn') File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1014, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 980, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 922, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_610a6acc211a4cb981ab5e8489eadc59\sklearn\setup.py", line 83, in configuration cythonize_extensions(top_path, config) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_610a6acc211a4cb981ab5e8489eadc59\sklearn\_build_utils\__init__.py", line 45, in cythonize_extensions basic_check_build() File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_610a6acc211a4cb981ab5e8489eadc59\sklearn\_build_utils\pre_build_helpers.py", line 106, in basic_check_build compile_test_program(code) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_610a6acc211a4cb981ab5e8489eadc59\sklearn\_build_utils\pre_build_helpers.py", line 72, in compile_test_program ccompiler.link_executable(objects, 'test_program', File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 731, in link_executable self.link(CCompiler.EXECUTABLE, objects, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-inent8bb\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 503, in link raise LinkError(msg) distutils.errors.LinkError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/05/04/507280f20fafc8bc94b41e0592938c6f4a910d0e066be7c8ff1299628f5d/scikit-learn-0.24.2.tar.gz#sha256=d14701a12417930392cd3898e9646cf5670c190b933625ebe7511b1f7d7b8736 (from https://pypi.org/simple/scikit-learn/) (requires-python:>=3.6). Command errored out with exit status 1: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpoo58vjfu' Check the logs for full command output. Downloading scikit-learn-0.24.1.tar.gz (7.4 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 scipy Using cached scipy-1.7.3-cp310-cp310-win_amd64.whl (34.3 MB) Collecting pytest Downloading pytest-6.2.5-py3-none-any.whl (280 kB) Collecting threadpoolctl>=2.0.0 Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB) Collecting attrs>=19.2.0 Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB) Collecting atomicwrites>=1.0 Downloading atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB) Collecting toml Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) Collecting colorama Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB) Collecting pluggy<2.0,>=0.12 Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB) Collecting packaging Downloading packaging-21.3-py3-none-any.whl (40 kB) Collecting py>=1.8.2 Downloading py-1.11.0-py2.py3-none-any.whl (98 kB) Collecting iniconfig Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.6-py3-none-any.whl (97 kB) Building wheels for collected packages: scikit-learn Building wheel for scikit-learn (pyproject.toml): started Building wheel for scikit-learn (pyproject.toml): finished with status 'error' ERROR: Command errored out with exit status 1: command: 'C:\hostedtoolcache\windows\Python\3.10.0\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpyb3vb5n8' cwd: C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_26b620b8e0f24393bb58071035d1b07f Complete output (73 lines): Partial import of sklearn during the build process. C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:528: UserWarning: Fallback spawn triggered. Please update distutils monkeypatch. warnings.warn( Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 522, in _fallback_spawn yield bag File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 510, in spawn return super().spawn(cmd, env=env) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 89, in m = lambda self, *args, **kw: func(self, *args, **kw) TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 501, in link self.spawn([self.linker] + ld_args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 509, in spawn with self._fallback_spawn(cmd, env) as fallback: File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 531, in _fallback_spawn bag.value = super().spawn(cmd) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 89, in m = lambda self, *args, **kw: func(self, *args, **kw) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\ccompiler.py", line 178, in CCompiler_spawn raise DistutilsExecError('Command "%s" failed with exit status %d%s' % distutils.errors.DistutilsExecError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in main() File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\hostedtoolcache\windows\Python\3.10.0\x64\lib\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 "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\build_meta.py", line 230, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\build_meta.py", line 215, in _build_with_temp_dir self.run_setup() File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 306, in setup_package() File "setup.py", line 302, in setup_package setup(**metadata) File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "setup.py", line 188, in configuration config.add_subpackage('sklearn') File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1014, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 980, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 922, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_26b620b8e0f24393bb58071035d1b07f\sklearn\setup.py", line 83, in configuration cythonize_extensions(top_path, config) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_26b620b8e0f24393bb58071035d1b07f\sklearn\_build_utils\__init__.py", line 45, in cythonize_extensions basic_check_build() File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_26b620b8e0f24393bb58071035d1b07f\sklearn\_build_utils\pre_build_helpers.py", line 106, in basic_check_build compile_test_program(code) File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-20bdprht\scikit-learn_26b620b8e0f24393bb58071035d1b07f\sklearn\_build_utils\pre_build_helpers.py", line 72, in compile_test_program ccompiler.link_executable(objects, 'test_program', File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 731, in link_executable self.link(CCompiler.EXECUTABLE, objects, File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-blz_bifu\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 503, in link raise LinkError(msg) distutils.errors.LinkError: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 objects\test_program.obj /OUT:test_program.exe" failed with exit status 1158 ---------------------------------------- ERROR: Failed building wheel for scikit-learn ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects Failed to build scikit-learn ```

for the error.

Pining setuptools version as it was suggested in https://github.com/pypa/distutils/issues/15 doesn't work (one more upstream issue: https://github.com/pypa/setuptools/issues/2372). So let's just try to wait for scikit-learn wheel for Python 3.10.

StrikerRUS commented 2 years ago

scikit-learn 1.0.2 was released Dec 25, 2021. That release helps to make all our CI jobs green except windows-latest, Python 3.10 (x86) because there is no wheel for 32-bit Windows: https://pypi.org/project/scikit-learn/#files.

Corresponding sources: https://github.com/scikit-learn/scikit-learn/blob/9aff4def9890819556e3d32c8ca6b2f27b528c22/.github/workflows/wheels.yml#L69-L81

Neither numpy, nor scipy has cp310-win32 wheels: https://pypi.org/project/numpy/#files https://pypi.org/project/scipy/#files

Should we also stop trying to build 32-bit Windows with new Python versions? Or is there any other ideas?

StrikerRUS commented 2 years ago

OK, I think this PR is ready for review.