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

Python 3.7 recently broken (no _bz2 module) on macOS 13 #682

Closed
2 of 10 tasks
gsnedders opened this issue Jun 13, 2023 · 14 comments
Closed
2 of 10 tasks

Python 3.7 recently broken (no _bz2 module) on macOS 13 #682

gsnedders opened this issue Jun 13, 2023 · 14 comments
Assignees

Comments

@gsnedders
Copy link

Description

Recently (i.e., since last week), we've started seeing a number of Python 3.7 tasks failing with:

../manifest/download.py:2: in <module>
    import bz2
/Users/runner/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/bz2.py:19: in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
E   ModuleNotFoundError: No module named '_bz2'

Presumably something in the new image caused CPython to fail to compile the _bz2 module?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20230611.2

https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=102338&view=logs&jobId=cd4b0752-91ac-5ee3-1416-93dd445ec171&j=5eb1b5a9-6d44-5065-06d8-b95593136516&t=2324b04f-e597-4527-9bcd-b3f55a7684b6

Is it regression?

20230524.1

Expected behavior

The Python 3.7 _bz2 module to be installed.

Actual behavior

The Python 3.7 _bz2 module is not installed.

Repro steps

python3.7 -c 'import bz2'

@mikhailkoliada mikhailkoliada transferred this issue from actions/runner-images Jun 13, 2023
@mikhailkoliada
Copy link

Transferring to setup-python as they are responsible for tool cached python

CC @dmitry-shibanov @MaksimZhukov

@jcscottiii
Copy link

jcscottiii commented Jun 14, 2023

I wanted to provide an additional data point to help with the investigation.

It seems that it is a regression in the latest patch version of 3.7 installed by the Mac agents.

We recognized that our builds last succeeded when python 3.7.16 was installed. Because we had only major.minor pinned, the Mac agents installed python 3.7.17. And that was when the builds started to fail.

As a temporary workaround, we have pinned the Python version to 3.7.16 to make the builds work again.

So you can look into how Python 3.7.17 was built. My hunch would be that the latest python install script does not have libbz2-dev installed prior to building it.

@MaksimZhukov
Copy link
Contributor

Hello @gsnedders! Thank you for reporting this!
We will investigate the issue!

huettenhain added a commit to binref/refinery that referenced this issue Jun 16, 2023
eliwangj added a commit to Faye-yufan/analytics-dataset that referenced this issue Jun 19, 2023
tillahoffmann added a commit to tillahoffmann/cmdstanpy that referenced this issue Jun 19, 2023
tillahoffmann added a commit to tillahoffmann/cmdstanpy that referenced this issue Jun 19, 2023
tillahoffmann added a commit to tillahoffmann/cmdstanpy that referenced this issue Jun 19, 2023
PatrykGala added a commit to neptune-ai/neptune-client that referenced this issue Jun 20, 2023
PatrykGala added a commit to neptune-ai/neptune-client that referenced this issue Jun 20, 2023
sk1p added a commit to LiberTEM/LiberTEM that referenced this issue Jun 20, 2023
sk1p added a commit to LiberTEM/LiberTEM-live that referenced this issue Jun 20, 2023
sk1p added a commit to LiberTEM/LiberTEM-holo that referenced this issue Jun 20, 2023
sk1p added a commit to LiberTEM/LiberTEM-blobfinder that referenced this issue Jun 20, 2023
fholger added a commit to fholger/tools-python that referenced this issue Jun 20, 2023
…tly an issue with later patch versions on MacOS, preventing our pipeline to complete successfully. See actions/setup-python#682

Signed-off-by: Holger Frydrych <holger.frydrych@tngtech.com>
yoda-vid added a commit to sanderslab/magellanmapper that referenced this issue Jun 26, 2023
The GitHub Actions CI for macOS with Python 3.7 leads to a `_bz2` missing module error (see actions/setup-python#682). Fix by pinning this Python to the prior version (eg see opendilab/DI-engine@f2881fe).
PaParaZz1 added a commit to opendilab/DI-engine that referenced this issue Jun 26, 2023
…2.1 (#678)

* feature(nyz): fix py37 macos ci bug and update default pytorch from 1.7.1 to 1.12.1

- actions/setup-python#682

* fix(nyz): fix py3.7.16 version bug (ut skip)
yoda-vid added a commit to sanderslab/magellanmapper that referenced this issue Jun 26, 2023
The GitHub Actions CI for macOS with Python 3.7 leads to a `_bz2` missing module error (see actions/setup-python#682). Fix by pinning this Python to the prior version (eg see opendilab/DI-engine@f2881fe). Restrict Python 3.7.16 only for macOS since it is not available on the Windows runner.
yoda-vid added a commit to sanderslab/magellanmapper that referenced this issue Jun 26, 2023
The GitHub Actions CI for macOS with Python 3.7 leads to a `_bz2` missing module error (see actions/setup-python#682). Fix by pinning this Python to the prior version (eg see opendilab/DI-engine@f2881fe). Restrict Python 3.7.16 only for macOS since it is not available on the Windows runner.
@seanlaw
Copy link

seanlaw commented Jun 26, 2023

Thank you for your response @parafoxia. I'll keep the issue opened until the hosted runners are updated.

@dmitry-shibanov Any idea when the hosted runners might be updated and available?

@dmitry-shibanov
Copy link
Contributor

Hello @seanlaw. I think it should be uploaded at the end of this week.

alexmalins added a commit to radioactivedecay/radioactivedecay that referenced this issue Jun 27, 2023
See actions/setup-python#682
The macos test is currently failing due to a GitHub Action issue

Also bump python version of Windows test
thetorpedodog added a commit to TileDB-Inc/TileDB-Cloud-Py that referenced this issue Jun 27, 2023
Due to this issue:
actions/setup-python#682
Python 3.7 does not work on Mac OS. Instead we manually seed the matrix
with the right Python version for each OS.
@seanlaw
Copy link

seanlaw commented Jun 29, 2023

Hello everyone. We uploaded a new version of python 3.7.17 with the fix. Could you please try to use this snippet to confirm that it works as expected?

      - run: rm -rf $RUNNER_TOOL_CACHE/Python/3.7.17
      - uses: actions/setup-python@v4
        with:
          python-version: 3.7.17

@dmitry-shibanov I would also like to confirm that this worked for me as well.

thetorpedodog added a commit to TileDB-Inc/TileDB-Cloud-Py that referenced this issue Jun 30, 2023
Due to this issue:
actions/setup-python#682
Python 3.7 does not work on Mac OS. Instead we store a point release
in an environment variable and install that.
@macanudo527
Copy link

@dmitry-shibanov It seems like the hosted runners have been updated. Tests are passing without the added snippet.

@dmitry-shibanov
Copy link
Contributor

Hello everyone. Sorry for the late response. The python 3.7.17 was updated in the hosted toolcache directory. For now I'm going to close the issue.

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

No branches or pull requests