{"id":412,"library":"poetry-core","title":"Poetry Core","description":"Poetry Core is the PEP 517 build backend and core utilities for the Poetry dependency management and packaging tool. The current version is 2.3.1, released on March 27, 2026. Poetry Core is actively maintained with regular updates.","status":"active","version":"2.3.1","language":"python","source_language":"en","source_url":"https://github.com/python-poetry/poetry-core","tags":["packaging","dependency management","PEP 517","build backend"],"install":[{"cmd":"pip install poetry-core","lang":"bash","label":"Install Poetry Core"}],"dependencies":[],"imports":[{"note":"Ensure correct import path to avoid ImportError.","symbol":"PoetryCore","correct":"from poetry.core import PoetryCore"}],"quickstart":{"code":"import os\nfrom poetry.core import PoetryCore\n\n# Initialize PoetryCore with project directory\nproject_dir = os.path.abspath(os.path.dirname(__file__))\npoetry = PoetryCore(project_dir)\n\n# Access project metadata\nprint(f\"Project Name: {poetry.name}\")\nprint(f\"Project Version: {poetry.version}\")","lang":"python","description":"A basic example demonstrating how to import and use PoetryCore to access project metadata."},"warnings":[{"fix":"Upgrade to Python 3.10 or later.","message":"Dropped support for Python 3.9 in version 2.3.0.","severity":"breaking","affected_versions":"2.3.0"},{"fix":"Ensure 'project' section is present in pyproject.toml.","message":"The 'project' section in pyproject.toml is now required as per PEP 621.","severity":"deprecated","affected_versions":"2.0.0"},{"fix":"Adjust the import statement for 'PoetryCore' according to the updated 'poetry' API documentation or downgrade 'poetry' to a compatible version.","message":"The 'PoetryCore' class cannot be imported directly from the 'poetry.core' module, indicating a breaking API change within the 'poetry' library.","severity":"breaking","affected_versions":"1.x.x"}],"env_vars":null,"last_verified":"2026-05-12T13:39:58.414Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Completely uninstall Poetry and then reinstall it using the official installer script to ensure a clean and correct setup.","cause":"This error typically occurs when the Poetry installation itself is corrupted or incomplete, leading to its internal components, specifically `poetry.core` modules, being unfindable.","error":"ModuleNotFoundError: No module named 'poetry.core.toml'"},{"fix":"Ensure all required system build tools and Python development headers are installed for your operating system. For specific packages, consider installing directly with `pip install --no-cache-dir <package_name>` or addressing any noted Python version incompatibilities.","cause":"This generic error indicates that a package's build process, relying on a PEP 517 backend like `poetry-core`, failed. This is often due to missing system-level build dependencies (e.g., compilers, Python development headers), incompatibility with the current Python version, or issues within the package's build configuration.","error":"ERROR: Could not build wheels for <package_name> which use PEP 517 and cannot be installed directly"},{"fix":"Verify that the `packages` array in your `pyproject.toml` (under `[tool.poetry]`) correctly specifies the `include` path(s) to your source code, or that your project's main module/package name matches the `name` field if `packages` is not explicitly defined.","cause":"This error arises during `poetry build` when the package structure defined or inferred in `pyproject.toml` does not match the actual file system, meaning Poetry cannot locate the source files it needs to package.","error":"ModuleOrPackageNotFound No file/folder found for package <package_name>"},{"fix":"Navigate to the root directory of your Poetry project, which contains the `pyproject.toml` file. If you are starting a new project, use `poetry new <project-name>` or `poetry init` to create one.","cause":"This fundamental error occurs when a `poetry` command is executed from a directory where a `pyproject.toml` file is not present, or in any parent directory, which is necessary for Poetry to recognize the project.","error":"Poetry could not find a pyproject.toml file in <path>"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}