Skip to content

Conversation

@larryliu0820
Copy link
Contributor

@larryliu0820 larryliu0820 commented Nov 7, 2025

When I install executorch on windows I run into this error: error:
[Errno 2] No such file or directory:
'pip-out\lib.win-amd64-cpython-312\executorch\version.py'

This is because we are not enabling symlink in git.

Need to run:

 git config --global core.symlinks true

and reclone the repo.

This PR fails the installation when that happens.

When I install executorch on windows I run into this error:   error:
[Errno 2] No such file or directory:
'pip-out\\lib.win-amd64-cpython-312\\executorch\\version.py'

It turns out sometimes the dst directory (in this case
pip-out\lib.win-amd64-cpython-312\executorch) is not installed before we
write version.py into it. This PR adds a mkpath call to make sure it's
always there.
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 7, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15684

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures, 3 Unrelated Failures

As of commit 2ebc280 with merge base 9a7882e (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@mergennachin
Copy link
Contributor

@GregoryComer @larryliu0820 cherry-pickable to 1.0.1?

@larryliu0820
Copy link
Contributor Author

Oops this patch doesn't fix the underlying problem. If we don't turn on symlink on windows: git config --global core.symlinks true, then the wheel doesn't have all the python files such as exir/backend/:

PS C:\executorch> tar -tf ".\dist\executorch-1.1.0a0+a6b20e6-cp312-cp312-win_amd64.whl" | Select-String exir

executorch/exir/_serialize/program.fbs
executorch/exir/_serialize/scalar_type.fbs

Probably will abandon this.

@GregoryComer
Copy link
Member

@GregoryComer @larryliu0820 cherry-pickable to 1.0.1?

Following up on Mengwei's comment, I had a task for 1.0 to at least catch this any maybe try to automatically fix the symlinks. I dropped it from release blockers due to priorities, but I'll pull it into 1.0.1.

@larryliu0820 larryliu0820 changed the title Fix windows build cannot find versions.py Error out if git symlink not enabled on Windows Nov 7, 2025
@larryliu0820
Copy link
Contributor Author

I updated the PR to error out in install_executorch.bat when symlink is not enabled on the environment.

Copy link
Member

@GregoryComer GregoryComer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this. Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants