python-poetry / python-poetry/poetry

Tensorflow 2.13.0 cannot be imported after install

Open
#8,271 32 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/external-issue status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • Poetry version: Poetry (version 1.5.1)
  • Python version: Python 3.11.4
  • OS version and name: macOS Ventura 13.3 M2 Chip macOS-13.3-arm64-arm-64bit
  • pyproject.toml: pyproject.toml
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

After installing tensorflow 2.13.0 with above pyproject.toml on macOs Apple Sillicon , importing fails with

ModuleNotFoundError: No module named 'tensorflow

Same method works under linux.
HINT: in tensorflow 2.13 the authors introduce platform specific install for pip. Under macOs arm it is supposed to install
tensorflow-macos . under linux there is another dependency tree

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked pyproject.toml and reproduce the TensorFlow 2.13.0 installation on macOS Ventura with an Apple Silicon chip, then compare it with Linux. Inspect how Poetry resolves and installs the platform-specific dependency tree; done means the installed environment can import TensorFlow on macOS without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.