Я пытался установить fastai на Python 3.11.8, чтобы получить доступ к fastai.vision.all (мой редактор кода — Visual Studio Code). Однако после использования «python -m pip install fastai» я получил сообщение subprocess.CalledProcessError, в котором говорится: «Эта ошибка возникает из-за подпроцесса, и, скорее всего, это не проблема pip.
Вот полное сообщение об ошибке, которое я получил от терминала:
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
The Meson build system
Version: 0.62.2
Source dir: C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a
Build dir: C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a\.mesonpy-qppxu250\build
Build type: native build
Project name: SciPy
Project version: 1.9.1
WARNING: Failed to activate VS environment: Could not parse vswhere.exe output
..\..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
The following exception(s) were encountered:
Running "icl " gave "[WinError 2] The system cannot find the file specified"
Running "cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "cc --version" gave "[WinError 2] The system cannot find the file specified"
Running "gcc --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang-cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "pgcc --version" gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a\.mesonpy-qppxu250\build\meson-logs\meson-log.txt
+ meson setup --native-file=C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=C:\Users\UserPC\AppData\Local\Programs\Python\Python311 C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a\.mesonpy-qppxu250\build
Traceback (most recent call last):
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in
main()
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 969, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 948, in _project
with Project.with_temp_working_dir(
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 777, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 682, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 713, in _configure
self._meson(
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 696, in _meson
return self._proc('meson', *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 691, in _proc
subprocess.check_call(list(args))
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a\\.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=C:\\Users\\UserPC\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a', 'C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a\\.mesonpy-qppxu250\\build']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
Я пытался обновить pip, а также установить колесо setuptools и scipy, но ничего не помогло. Я не уверен, что это из-за того, что версия fastai и scipy несовместима с версией Python. Буду рад любым советам.
Я пытался установить fastai на Python 3.11.8, чтобы получить доступ к fastai.vision.all (мой редактор кода — Visual Studio Code). Однако после использования «python -m pip install fastai» я получил сообщение subprocess.CalledProcessError, в котором говорится: «Эта ошибка возникает из-за подпроцесса, и, скорее всего, это не проблема pip. Вот полное сообщение об ошибке, которое я получил от терминала: [code] error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
Running "icl " gave "[WinError 2] The system cannot find the file specified"
Running "cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "cc --version" gave "[WinError 2] The system cannot find the file specified"
Running "gcc --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang --version" gave "[WinError 2] The system cannot find the file specified"
Running "clang-cl /?" gave "[WinError 2] The system cannot find the file specified"
Running "pgcc --version" gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\UserPC\AppData\Local\Temp\pip-install-lfh_uajv\scipy_0c2595c1abca45c9840a4fe284f06c6a\.mesonpy-qppxu250\build\meson-logs\meson-log.txt
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in
main()
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 969, in get_requires_for_build_wheel
with _project(config_settings) as project:
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 948, in _project
with Project.with_temp_working_dir(
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 777, in with_temp_working_dir
yield cls(source_dir, tmpdir, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 682, in __init__
self._configure(reconfigure=bool(build_dir) and not native_file_mismatch)
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 713, in _configure
self._meson(
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 696, in _meson
return self._proc('meson', *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPC\AppData\Local\Temp\pip-build-env-zzmgqcft\overlay\Lib\site-packages\mesonpy\__init__.py", line 691, in _proc
subprocess.check_call(list(args))
File "C:\Users\UserPC\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['meson', 'setup', '--native-file=C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a\\.mesonpy-native-file.ini', '-Ddebug=false', '-Doptimization=2', '--prefix=C:\\Users\\UserPC\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a', 'C:\\Users\\UserPC\\AppData\\Local\\Temp\\pip-install-lfh_uajv\\scipy_0c2595c1abca45c9840a4fe284f06c6a\\.mesonpy-qppxu250\\build']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
[/code] Я пытался обновить pip, а также установить колесо setuptools и scipy, но ничего не помогло. Я не уверен, что это из-за того, что версия fastai и scipy несовместима с версией Python. Буду рад любым советам.