Open ahirner opened 1 year ago
Can confirm this is an issue, even without allow-prerelease/nightly build.
error: Missing suitable source/wheel file entry for torch
pyproject.toml
[tool.poetry.dependencies]
python = ">=3.8,<3.10"
catboost = "^1.1.1"
imbalanced-learn = "^0.10.1"
joblib = "^1.2.0"
lightgbm = "^3.3.4"
numpy = "^1.24.1"
optuna = "^2"
pandas = "^1.5.2"
scikit-learn = "^1.2.0"
tqdm = "^4.64.1"
xgboost = "^1.7.3"
sdv = "^0.17.2"
[tool.poetry.group.dev.dependencies] black = "^22.12.0" python-lsp-server = "^1.7.0" pyls-isort = "^0.2.2" jupyter-core = "^5.1.3" nbconvert = "^7.2.7" pyls-black = "^0.4.7" jedi = "^0.18.2"
[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies.torch] version = "1.13.1+cpu" source = "torch"
[[tool.poetry.source]] name = "torch" url = "https://download.pytorch.org/whl/cpu" default = false secondary = true
- `shell.nix`
```nix
{ pkgs ? import <nixpkgs> { } }:
let
myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
python = pkgs.python39;
editablePackageSources = { my-app = ./src; };
preferWheels = true;
};
in myAppEnv.env
I'm also affected by this.
Describe the issue
Adding
torch
as prerelease dependency fails withnix {develop,run}
:I expected that
nix develop
drops into a shell with pythontorch
installed.poetry lock
resolves this dependency.allow-prerelease
might be ignored bypoetry2nix
.Additional context
Repo with relevant PR: https://github.com/ahirner/y-torch/pull/1
flake.nix
pyproject.toml
Root cause of failure:
[tool.poetry.dependencies.torch] version = "2.0.0.dev20230101+cpu" allow-prereleases = true source = "torch"
[tool.poetry.scripts] y-torch = 'y_torch:main'
[tool.poetry.dev-dependencies] python-lsp-server = "" python-lsp-ruff = ""
[tool.ruff.per-file-ignores] "init.py" = ["E402"]
[build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api"
[[tool.poetry.source]] name = "torch" url = "https://download.pytorch.org/whl/nightly/cpu" default = false secondary = true