-
Notifications
You must be signed in to change notification settings - Fork 343
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Running pip install . on macOS fails with the following error:
running build_py
creating build/lib/tensorflow_model_optimization
error: could not create 'build/lib/tensorflow_model_optimization': Not a directory
System information
- Operating System: macOS
- File system: Case-insensitive (default macOS file system)
Root cause
macOS uses a case-insensitive file system by default.
In the repository root, there is a file named BUILD. During the pip install . process, pip attempts to create a directory named build.
Because BUILD and build are treated as the same path on a case-insensitive file system, directory creation fails.
Workaround
Building and installing the package via Bazel works correctly:
git clone https://github.com/tensorflow/model-optimization.git
cd model-optimization
bazel build --copt=-O3 --copt=-march=native :pip_pkg
PKGDIR=$(mktemp -d)
./bazel-bin/pip_pkg "$PKGDIR"
python -m pip install --upgrade "$PKGDIR"/*.whlExpected behavior
pip install . should succeed on macOS without requiring a Bazel-based workaround.
Additional notes
This issue appears to be specific to case-insensitive file systems and may not reproduce on Linux or on macOS systems configured with a case-sensitive file system.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working