Poetry2nix mkPoetryEnv error: Missing suitable source/wheel file entry


I am encountering the following error when trying to enter a poetry2nix.mkPoetryEnv

error: Missing suitable source/wheel file entry for numpy

The route to this error was as follows:

Create poetry files:

mkdir tmp && cd tmp
nix-shell -p poetry python310
poetry init

interactviely add the python packages (just numpy) that result in the pyproject.toml file:

name = "tmp"
version = "0.1.0"
description = ""
authors = []

python = "^3.10"
numpy = "^1.23.4


requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

A poetry.lock was then created by

poetry install # still in nix-shell

Next I exited the nix shell and created a shell.nix

{ pkgs ? import <nixpkgs> {} }:
  myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
     python = pkgs.python310;
     pyproject = ./pyproject.toml;
     poetrylock = ./poetry.lock;
in myAppEnv.env

When I run nix-shell the source/wheel error is encountered.

Issue resolved by upgrading poetry (from version 1.1.12 to 1.1.14).

1 Like