Skip to content

Commit 60acb03

Browse files
committed
Add explicit PyTorch dependency with platform-specific constraints
- Add torch as explicit dependency with environment markers - Constrain macOS Intel to PyTorch <2.7.0 due to wheel availability issues - Allow broader ranges for other platforms with better wheel support - Fixes 'Unable to find installation candidates for torch (2.8.0)' on macOS Intel - Ensures PyTorch compatibility across Windows, macOS (Intel/ARM), and Linux
1 parent 238c2c7 commit 60acb03

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ pillow = [
2323
# Linux - most flexible
2424
{version = ">=10.0.0,<12.0.0", markers = "sys_platform == 'linux'"}
2525
]
26+
# PyTorch with platform-specific compatibility to avoid wheel availability issues
27+
torch = [
28+
# Windows - stable version range
29+
{version = ">=2.0.0,<2.8.0", markers = "sys_platform == 'win32'"},
30+
# macOS Intel - more conservative range due to wheel availability
31+
{version = ">=2.0.0,<2.7.0", markers = "sys_platform == 'darwin' and platform_machine == 'x86_64'"},
32+
# macOS ARM64 - broader range, better wheel support
33+
{version = ">=2.0.0,<2.8.0", markers = "sys_platform == 'darwin' and platform_machine == 'arm64'"},
34+
# Linux - most flexible, best wheel support
35+
{version = ">=2.0.0,<2.8.0", markers = "sys_platform == 'linux'"}
36+
]
2637
# Comprehensive environment markers for numpy compatibility across all platforms and architectures
2738
# Note: pandas 2.1.4 requires numpy >=1.26.0, so we must respect that constraint
2839
numpy = [

0 commit comments

Comments
 (0)