Skip to content

Make tensorflow an optional dependency for Python 3.12+ support#4

Open
HasinthakaPiyumal wants to merge 1 commit into
JeremieMelo:masterfrom
HasinthakaPiyumal:fix/python-3.12-plus-support
Open

Make tensorflow an optional dependency for Python 3.12+ support#4
HasinthakaPiyumal wants to merge 1 commit into
JeremieMelo:masterfrom
HasinthakaPiyumal:fix/python-3.12-plus-support

Conversation

@HasinthakaPiyumal
Copy link
Copy Markdown

Summary

  • Move tensorflow from hard dependency to optional extra (pip install torchonn-pyutils[tf])
  • Update minimum dependency versions for Python 3.12+ compatibility

Why

tensorflow has no wheel for Python 3.12+ on many platforms (especially Windows), causing pip install torchonn-pyutils to fail. Since tensorflow is not required by the core pyutils functionality, it should be optional.

Changes

  • pyproject.toml: Move tensorflow to [project.optional-dependencies]
  • Update minimum versions: numpy>=1.26.0, scipy>=1.11.0, scikit-learn>=1.3.0, matplotlib>=3.8.0, torch>=2.1.0, torchvision>=0.16.0

Test plan

  • pip install -e . succeeds on Python 3.14.3
  • from pyutils.general import logger works without tensorflow installed

Related: JeremieMelo/pytorch-onn#6 (torchonn Python 3.14 support depends on this fix)

🤖 Generated with Claude Code

tensorflow has no wheel for Python 3.12+ on many platforms (especially
Windows). Since it is not required by the core pyutils functionality,
move it to optional dependencies installable via `pip install torchonn-pyutils[tf]`.

Also update minimum dependency versions for Python 3.12+ compatibility:
- numpy>=1.26.0, scipy>=1.11.0, scikit-learn>=1.3.0
- matplotlib>=3.8.0, torch>=2.1.0, torchvision>=0.16.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant