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

pip3 install fails on Windows with exit code 3221225477 #5027

Closed
2 of 7 tasks
aminya opened this issue Feb 5, 2022 · 4 comments
Closed
2 of 7 tasks

pip3 install fails on Windows with exit code 3221225477 #5027

aminya opened this issue Feb 5, 2022 · 4 comments

Comments

@aminya
Copy link

aminya commented Feb 5, 2022

Description

Not sure why has changed in recent days, but pip3 has started to fail on Windows images. I have tried everything, but I found no solution.

My action's issue:
aminya/setup-cpp#27

There is a lot of tests available in the repo that reproduce the problem.

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

I could not find the version you are saying. But this is a build link:
https://github.com/aminya/setup-cpp/actions/runs/1797807486

Is it regression?

Yes, it worked 3 days ago: https://github.com/aminya/setup-cpp/actions/runs/1782209385

Expected behavior

pip3 should work on Windows

Actual behavior

It fails

Repro steps

Use pip3 installed on the images to install something.

@shilovmaksim
Copy link
Contributor

Hi @aminya .
Thank you for your report.
Most likely related to pypa/pip#10875 and pypa/pip#10444
Please use suggested workaround python -m pip install -U pip==21.3.1 with decreasing pip version.
We will think about decreasing pip version on the images.

jacobperron added a commit to ros2/rmw_cyclonedds that referenced this issue Feb 8, 2022
- Pin version of pip
  -  See actions/runner-images#5027
- Target Windows 2019

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@dmitry-shibanov
Copy link
Contributor

Hello @aminya. Internally toolkit/exec uses spawn to grab stdout, stderr and exit code via streams. We prepared a temporary workaround in the setup-python action to use child_process exec and it works as expected. You can try to use a similar solution.
Besides, It looks like when the latest pip's commands run under the shell they work as expected. We can achieve the same behaviour with spawn if we pass shell option (assign to true).

@dmitry-shibanov
Copy link
Contributor

Hello @aminya, just a gentle ping.

@aminya
Copy link
Author

aminya commented Feb 15, 2022

Thanks for reminding me.

I was able to fix the issue by downgrading pip on Windows:
https://github.com/aminya/setup-cpp/blob/9b3ba25d98361c6007a0ba02b9ee519b0fbdacce/src/utils/setup/setupPipPack.ts#L42

I also switched to using python -m pip install package, which doesn't have the same issue. This is a bug that needs to be fixed in pip.

I think the pip version in the images should be downgraded

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

No branches or pull requests

5 participants