unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
363 stars 161 forks source link

`macos-latest` is incompatible with Python versions < `3.11, 3.12` #2339

Closed purva-thakre closed 6 months ago

purva-thakre commented 6 months ago

Related to https://github.com/actions/runner-images/issues/9770

We use macos-latest in our GIthub workflows. For the jobs that run on Python 3.9 and Python 3.10, we get a notice to use python3.x -m pip install --upgrade pip instead of python -m pip install --upgrade pip

image

https://github.com/unitaryfund/mitiq/actions/runs/8899188557

Option 1 - Downgrade to an earlier version of macos Option 2 - Don't run these jobs on macos for Python 3.9 and Python 3.10

cclauss commented 6 months ago

The title of this issue is incorrect.

Those are WARNINGS, not ERRORS. If your code does not require features of the latest and greatest release of pip your GitHub Actions should run as expected. GitHub Actions are updated periodically so this warning will come and go as new versions of pip and setup-python are released.

These warnings can be solved with pip install --upgrade pip. The python -m / python3 -m is not required because actions/setup-python creates and activates a venv.

cosenal commented 6 months ago

@purva-thakre isn't this a dupe of https://github.com/unitaryfund/mitiq/issues/2321? If so, I closed it as resolved, because it was fixed in https://github.com/actions/python-versions/pull/264. In which recent build do you see the warnings/errors?

purva-thakre commented 6 months ago

@cosenal I linked it in the issue description: https://github.com/unitaryfund/mitiq/actions/runs/8899188557

I saw this in one of the builds for #2338; I was not aware of #2321. Feel free to close this issue if you think so. I am a little bit confused if this is something we need to work on or it will resolve itself.

I haven't gotten the chance to look into what the other comment says about the title being incorrect. I created this issue last night due to the first line in the description of the linked actions/runner-images issue.

The way I understood it, macos-latest i.e. macos-14 could only use Python 3.11 and 3.12 right now. So, upgrading pip with python -m pip install --upgrade pip is possible. But for the earlier versions of macos, we get the warning that we should specify the python version number i.e. python3.x -m pip install --upgrade pip where x<11.

cosenal commented 6 months ago

I clicked on that link and I don't see the macos builds failing 🤔

purva-thakre commented 6 months ago

it's not failing for me either. The screenshot is from the annotation at the bottom.

cosenal commented 6 months ago

As @cclauss said, those annotations are warnings about pip, not related to what you say in the title of the issue.

purva-thakre commented 6 months ago

@cosenal Yeah, I'll try to understand their comment later today because I somehow connected the pip warning to the missing python versions. 🤷🏾‍♀️

Feel free to close this or change the title/issue description as required.

cosenal commented 6 months ago

I will close this. The notices you see at the bottom of the runs are about upgrading pip in those runners we use in the github workflows. This is not something that is affecting Mitiq or its builds at the moment.