Why ist setuptools not installing install_requires

Question:

My Python package is installed using setuptools configured with a setup.cfg file. In it requirements are specified:

[options]
packages = find:
zip_safe = True
include_package_data = True
install_requires =
    gmsh >= 4.10.5
    matplotlib >= 3.6.1
    numpy >= 1.23.3

When installing the package via pip the package to a fresh venv non of the requirements are installed. The output of pip show no errors or related information. However, once manually installing them everything works fine. How can I get pip to actually install the requirements?

Asked By: Henrik

||

Answers:

It is mentioned in the comments that you have a pyproject.toml file. If you use the toml configuration then you do not need the setup.cfg at all. Delete the setup.cfg and add in pyproject.toml:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = ...
version = ...
dependencies = [
    "gmsh >= 4.10.5",
    "matplotlib >= 3.6.1",
    "numpy >= 1.23.3",
]
Answered By: wim
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.