Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署时出现错误 #101

Open
Ghost01900 opened this issue Oct 17, 2024 · 1 comment
Open

部署时出现错误 #101

Ghost01900 opened this issue Oct 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Ghost01900
Copy link

描述错误 | Describe the bug
部署时出现错误

如何复现 | To Reproduce
告诉我们该错误是如何触发的:

  1. 使用poetry install命令
  2. 报错

错误预期行为 | Expected behavior
请尽可能地使用简洁语言描述,以方便开发者快速定位重点.

截图 | Screenshots
可以的话,请提供相关截图.
PixPin_2024-10-17_22-38-26

操作环境 | Desktop:

  • OS: win11
  • Platform Info: 8h16g 150g
  • Runtime Area:cn
  • ATRI 版本 YHN-001-A07
    补充内容 | Additional context
    你可以在此添加其它说明,或向我们提供你的解决方案.

·报错信息
F:\ATRI-main>poetry install
Warning: Found deprecated key 'default' or 'secondary' in pyproject.toml configuration for source tsinghua-mirror. Please provide the key 'priority' instead. Accepted values are: 'default', 'primary', 'secondary', 'supplemental', 'explicit'.
Warning: Found deprecated priority 'default' for source 'tsinghua-mirror' in pyproject.toml. You can achieve the same effect by changing the priority to 'primary' and putting the source first.
Installing dependencies from lock file

Package operations: 55 installs, 1 update, 0 removals

  • Installing pyyaml (6.0): Failed

ChefBuildError

Backend subprocess exited when trying to invoke get_requires_for_build_wheel

running egg_info
writing lib\PyYAML.egg-info\PKG-INFO
writing dependency_links to lib\PyYAML.egg-info\dependency_links.txt
writing top-level names to lib\PyYAML.egg-info\top_level.txt
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\pyproject_hooks_in_process_in_process.py", line 389, in
main()
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\pyproject_hooks_in_process_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\pyproject_hooks_in_process_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\build_meta.py", line 302, in get_build_requires
self.run_setup()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
exec(code, locals())
File "", line 288, in
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_init
.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\core.py", line 183, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\core.py", line 199, in run_commands
dist.run_commands()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\dist.py", line 954, in run_commands
self.run_command(cmd)
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\dist.py", line 991, in run_command
super().run_command(command)
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\dist.py", line 973, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\command\egg_info.py", line 315, in run
self.find_sources()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\command\egg_info.py", line 323, in find_sources
mm.run()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\command\egg_info.py", line 544, in run
self.add_defaults()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\command\egg_info.py", line 582, in add_defaults
sdist.add_defaults(self)
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools\command\sdist.py", line 108, in add_defaults
super().add_defaults()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\command\sdist.py", line 238, in add_defaults
self._add_defaults_ext()
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\command\sdist.py", line 323, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 204, in get_source_files
File "C:\Users\Admin\AppData\Local\Temp\tmpw14gutpv.venv\Lib\site-packages\setuptools_distutils\cmd.py", line 107, in getattr
raise AttributeError(attr)
AttributeError: cython_sources

at ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\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 pyyaml (6.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyyaml (==6.0)"'.

F:\ATRI-main>

@Ghost01900 Ghost01900 added the bug Something isn't working label Oct 17, 2024
@Kyomotoi
Copy link
Owner

在这些报错中,你只需关注最后一行:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pyyaml (6.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyyaml (==6.0)"'.

然后去 google 或者 bing 一下大概就能得到解答。

顺便帮你 get 下这报错重点: pyyaml (6.0) not supporting PEP 517 builds.

所以解决方案(大概):

  • 打开 pyproject.toml
  • 找到 PyYAML = "^6.0"
  • 改成 PyYAML = "^6.0.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants