Skip to content

Fix pip install . -e when buck2 is not installed #11842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/using-executorch-building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Or alternatively, [install conda on your machine](https://conda.io/projects/cond
# Intel-based macOS systems require building PyTorch from source (see below)
./install_executorch.sh
```
See the [PyTorch instructions](https://github.com/pytorch/pytorch#installation) on how to build PyTorch from source.

See the [PyTorch instructions](https://github.com/pytorch/pytorch#installation) on how to build PyTorch from source.

Use the [`--use-pt-pinned-commit` flag](../../install_executorch.py) to install ExecuTorch with an existing PyTorch build:

Expand All @@ -90,7 +90,7 @@ Or alternatively, [install conda on your machine](https://conda.io/projects/cond

# Or you can directly do the following if dependencies are already installed
# either via a previous invocation of `./install_executorch.sh` or by explicitly installing requirements via `./install_requirements.sh` first.
pip install -e .
pip install -e . --no-build-isolation
```

If C++ files are being modified, you will still have to reinstall ExecuTorch from source.
Expand Down Expand Up @@ -243,7 +243,7 @@ Install ClangCL for Windows from the [official website](https://learn.microsoft.
To check if conda is detected by the powershell prompt, try `conda list` or `conda --version`

If conda is not detected, you could run the powershell script for conda named `conda-hook.ps1`.
To verify that Conda is available in the in the powershell environment, run try `conda list` or `conda --version`.
To verify that Conda is available in the in the powershell environment, run try `conda list` or `conda --version`.
If Conda is not available, run conda-hook.ps1 as follows:
```bash
$miniconda_dir\\shell\\condabin\\conda-hook.ps1
Expand Down
3 changes: 0 additions & 3 deletions install_executorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
install_optional_example_requirements,
install_requirements,
python_is_compatible,
TORCH_NIGHTLY_URL,
)

# Set up logging
Expand Down Expand Up @@ -208,8 +207,6 @@ def main(args):
".",
"--no-build-isolation",
"-v",
"--extra-index-url",
TORCH_NIGHTLY_URL,
]
)
subprocess.run(cmd, check=True)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ requires = [
"tomli", # Imported by extract_sources.py when using python < 3.11.
"wheel", # For building the pip package archive.
"zstd", # Imported by resolve_buck.py.
"certifi", # Imported by resolve_buck.py.
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -49,7 +50,7 @@ classifiers = [
]

# Python dependencies required for use.
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
requires-python = ">=3.10,<3.13"
dependencies=[
"expecttest",
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ setuptools>=63 # For building the pip package contents.
tomli # Imported by extract_sources.py when using python < 3.11.
wheel # For building the pip package archive.
zstd # Imported by resolve_buck.py.
certifi # Imported by resolve_buck.py.
lintrunner==0.12.7
lintrunner-adapters==0.12.4
2 changes: 1 addition & 1 deletion tools/cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function(resolve_buck2)

set(resolve_buck2_command
${PYTHON_EXECUTABLE} ${executorch_root}/tools/cmake/resolve_buck.py
--cache_dir=buck2-bin
--cache_dir=${executorch_root}/buck2-bin
)

if(NOT ${BUCK2} STREQUAL "")
Expand Down
Loading