前提・実現したいこと
Python超初心者です。
今コマンドプロンプトでscikit-learnのインストールを試みていますが
以下のようなエラーが発生しました。
発生している問題・エラーメッセージ
ERROR: Command errored out with exit status 1: command: 'C:\Users\yutan\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\yutan\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\yutan\AppData\Local\Temp\tmp28l6twj6' cwd: C:\Users\yutan\AppData\Local\Temp\pip-install-deq76ycw\scikit-learn_e8a901f6061945808a4fddaf83eeb554 Complete output (48 lines): Partial import of sklearn during the build process. No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils Traceback (most recent call last): File "C:\Users\yutan\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "C:\Users\yutan\AppData\Local\Programs\Python\Python310\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:\Users\yutan\AppData\Local\Programs\Python\Python310\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\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\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\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\overlay\Lib\site-packages\setuptools\build_meta.py", line 215, in _build_with_temp_dir self.run_setup() File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\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 <module> setup_package() File "setup.py", line 302, in setup_package setup(**metadata) File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\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\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\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\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 982, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\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 83, in configuration cythonize_extensions(top_path, config) File "C:\Users\yutan\AppData\Local\Temp\pip-install-deq76ycw\scikit-learn_e8a901f6061945808a4fddaf83eeb554\sklearn\_build_utils\__init__.py", line 45, in cythonize_extensions basic_check_build() File "C:\Users\yutan\AppData\Local\Temp\pip-install-deq76ycw\scikit-learn_e8a901f6061945808a4fddaf83eeb554\sklearn\_build_utils\pre_build_helpers.py", line 106, in basic_check_build compile_test_program(code) File "C:\Users\yutan\AppData\Local\Temp\pip-install-deq76ycw\scikit-learn_e8a901f6061945808a4fddaf83eeb554\sklearn\_build_utils\pre_build_helpers.py", line 66, in compile_test_program ccompiler.compile(['test_program.c'], output_dir='objects', File "C:\Users\yutan\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 323, in compile self.initialize() File "C:\Users\yutan\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 220, in initialize vc_env = _get_vc_env(plat_spec) File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\overlay\Lib\site-packages\setuptools\msvc.py", line 316, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) File "C:\Users\yutan\AppData\Local\Temp\pip-build-env-esdjq57f\overlay\Lib\site-packages\setuptools\msvc.py", line 270, in _msvc14_get_vc_env raise distutils.errors.DistutilsPlatformError( distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Failed building wheel for scikit-learn Failed to build scikit-learn ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects
該当のソースコード
ソースコード
試したこと
pipの更新、Pyinstallerのインストールは実施したのですが同様のエラーでした。
補足情報(FW/ツールのバージョンなど)
バージョン:python-3.10.0-embed-amd64
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。