Skip to content
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

pip packages on windows have started failing #27

Closed
lefticus opened this issue Feb 4, 2022 · 10 comments
Closed

pip packages on windows have started failing #27

lefticus opened this issue Feb 4, 2022 · 10 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lefticus
Copy link
Contributor

lefticus commented Feb 4, 2022

See here : https://github.com/lefticus/json2cpp/runs/5071314373?check_suite_focus=true#step:4:24

These packages were succeeded 2 days ago, failing now. I cannot tell what (if anything) changed in setup-cpp or github action configurations. I also don't see a meaningful message.

@aminya
Copy link
Owner

aminya commented Feb 4, 2022

That's so strange. It is also happening on the master CI. 🤷‍♂️

Maybe related to this. It seems they have broken python
actions/runner-images#5009
actions/setup-python#328

@aminya aminya added the bug Something isn't working label Feb 4, 2022
@lefticus
Copy link
Contributor Author

lefticus commented Feb 4, 2022

Looks like it is fixed if you upgrade to setup-python 2.3.2 actions/setup-python#328 (comment) or just use v2 tag so it gets the latest in v2.

@aminya
Copy link
Owner

aminya commented Feb 4, 2022

@lefticus I updated v1 branch. Could you try this in another project? Maybe the issue is fixed, but my tests fail because of the environment.

@aminya aminya pinned this issue Feb 4, 2022
@aminya aminya added the help wanted Extra attention is needed label Feb 4, 2022
@lefticus
Copy link
Contributor Author

lefticus commented Feb 4, 2022

Same error still, it looks like it's still using the pip installed by github, instead of the one you are trying to use from chocolatey.

I'll fork this and see if I can learn anything.

@aminya
Copy link
Owner

aminya commented Feb 5, 2022

I am trying to debug the issue, but its failure does not give any useful messages.

Did you try manually adding setup-python before setup-cpp?

- uses: actions/setup-python@v2
  with:
    python-version: '3.x'

@lefticus
Copy link
Contributor Author

lefticus commented Feb 5, 2022

I did try that, and still get a failure. I haven't tried doing that and disabling your install of python

@aminya
Copy link
Owner

aminya commented Feb 5, 2022

setup-cpp originally did not install pip if it found it pre-installed. But because the pre-installed pip3 is broken, I added this exception for windows to install it. However, it does not help, and pip3 is still broken.

if (isGitHubCI() && process.platform === "win32") {
// run setupPython in actions_python anyways
await setupPython(getVersion("python", undefined), "", process.arch)
}

I have opened an issue for GitHub
actions/runner-images#5027

@lefticus
Copy link
Contributor Author

lefticus commented Feb 5, 2022

I can now confirm that if I manually install setup-python@v2, then pip install gcovr conan and disable setup-cpp's installation of gcovr and conan, then things work as expected.

That is, I have been able to isolate it to whatever setup-cpp is doing with pip.

https://github.com/lefticus/json2cpp/runs/5078807626?check_suite_focus=true#step:4:1

@aminya
Copy link
Owner

aminya commented Feb 5, 2022

More reasons for this issue:

exec breakage:
actions/toolkit#992

pip breakage
pypa/pip#10875

@aminya
Copy link
Owner

aminya commented Feb 5, 2022

Fixed in b7f10af

The pre-installed pip executable is broken on Windows images. The workaround is to use python -m pip install package

@aminya aminya closed this as completed Feb 5, 2022
@aminya aminya unpinned this issue Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants