Python 3.11 Poetry环境中安装factory包失败的解决求助
Python 3.11 Poetry环境中安装factory包失败的解决求助
我尝试在Poetry环境里安装factory包,执行poetry add factory命令时碰到了报错,具体错误信息如下:
poetry add factory Using version ^1.2 for factory Updating dependencies Resolving dependencies... (3.4s) Package operations: 1 install, 1 update, 0 removals - Updating setuptools (75.1.0 -> 75.6.0) - Installing factory (1.2): Failed ChefBuildError Backend subprocess exited when trying to invoke get_requires_for_build_wheel Traceback (most recent call last): File "/Users/XXXX/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/Users/XXXX/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/XXXX/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/rh/h9myr_6x779dbxhx7fkzrwlh0000gn/T/tmpfdlsqi07/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/rh/h9myr_6x779dbxhx7fkzrwlh0000gn/T/tmpfdlsqi07/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires self.run_setup() File "/private/var/folders/rh/h9myr_6x779dbxhx7fkzrwlh0000gn/T/tmpfdlsqi07/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 522, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/rh/h9myr_6x779dbxhx7fkzrwlh0000gn/T/tmpfdlsqi07/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup exec(code, locals()) File "<string>", line 11, in <module> NameError: name 'file' is not defined. Did you mean: 'filter'? at ~/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare 160│ 161│ error = ChefBuildError("\n\n".join(message_parts)) 162│ 163│ if error is not None: → 164│ raise error from None 165│ 166│ return path 167│ 168│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path: Note: This error originates from the build backend, and is likely not a problem with poetry but with factory (1.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "factory (==1.2)"'.
我安装其他依赖都没遇到过问题,目前用的是Python 3.11版本,有没有大佬能告诉我该怎么解决这个问题呀?
备注:内容来源于stack exchange,提问作者Teresa Jimenez
相关产品推荐
相关产品推荐

