Cannot install development environment on Python 3.12
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- build-system
调研方向
首先检查 poetry.lock 中的依赖信息,并使用报告中所示的 poetry install 或 pip wheel 命令重现故障。当开发环境能够在 Python 3.12 上使用兼容的 PyYAML 版本和更新后的 lock 文件成功安装时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Bug report
Cannot install development environment on Python 3.12.
Repro steps
└➜ poetry install
Installing dependencies from lock file
Package operations: 114 installs, 0 updates, 0 removals
- Installing smmap (5.0.0)
- Installing gitdb (4.0.9)
- Installing mccabe (0.6.1)
- Installing pbr (5.8.1)
- Installing pycodestyle (2.7.0)
- Installing pyflakes (2.3.1)
- Installing pyparsing (3.0.8)
- Installing attrs (21.4.0)
- Installing certifi (2022.12.7)
- Installing charset-normalizer (2.0.12)
- Installing docutils (0.19)
- Installing flake8 (3.9.2)
- Installing gitpython (3.1.27)
- Installing idna (3.3)
- Installing markupsafe (2.1.1)
- Installing packaging (21.3)
- Installing pytz (2022.1)
- 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 "/home/maxim/.local/share/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
File "/home/maxim/.local/share/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maxim/.local/share/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 288, in <module>
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 313, in run
self.find_sources()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in find_sources
mm.run()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 544, in run
self.add_defaults()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 582, in add_defaults
sdist.add_defaults(self)
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/command/sdist.py", line 109, in add_defaults
super().add_defaults()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 238, in add_defaults
self._add_defaults_ext()
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 323, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 204, in get_source_files
File "/tmp/tmps0g2qzy0/.venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
raise AttributeError(attr)
AttributeError: cython_sources
at ~/.local/share/pipx/venvs/poetry/lib/python3.12/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)"'.
- Installing six (1.16.0)
- Installing snowballstemmer (2.2.0)
- Installing stevedore (3.5.0)
- Installing urllib3 (1.26.9)
System info
WSL2, Windows 11
└➜ uname -a
Linux 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
└➜ python --version
Python 3.12.3
└➜ poetry --version
Poetry (version 1.8.5)
I suppose the problem is related to the fact that poetry.lock requires pyyaml == 6.0, but looks like there is a problem to build pyyaml < 6.0.1 for python 3.11 and newer (https://github.com/yaml/pyyaml/issues/736).
Proposed solution
- Maybe bump
pyyamldependency to the latest6.0.2? - Update
poetry.lockfor python 3.12 and newer (for pyyaml package wheels are listed for 3.11 and older)
- 主要语言
- Python
- 星标
- 730
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dry-python/classes 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
dry-python/classes#496 ·
-
bug
难度 2/5 1-3 小时 新手友好度 45/100
dry-python/classes#494 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
dry-python/classes#481 · 5 条评论 · 4 个 reaction ·
-
bug
难度 2/5 1-3 小时 新手友好度 35/100
dry-python/classes#386 ·
-
bug
难度 4/5 3-5 天 新手友好度 25/100
dry-python/classes#330 · 1 条评论 ·
查看 dry-python/classes 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·