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.8 and 3.9 not found on macOS #850
Comments
This is a duplicate, To fix, you can use one of the options at python/peps#3763, or stick to |
I am facing the same issues when running GHA I get:
|
Odd, that issue is from months ago, but I only started having problems this morning. |
Yeah, You can check the top of your CI logs to see which image was used yesterday and today. |
* deprecate cov_to_corr_matrix * change import for deprecated * Update setup.py fix setup.py * Update requirements.txt add mne dependency to requirement file for doc only * Update Dockerfile remove protobuf install in Dockerfile (now by default in setup.py) * Update light_benchmark.py flake8 # noqa: E231 * Update plot_financial_data.py flake8 * Update light_benchmark.yml trigger benchmark on change to setup.py * [pre-commit.ci] auto fixes from pre-commit.com hooks * Update testing.yml as per actions/setup-python#850 (comment) --------- Co-authored-by: gcattan <gcattan@hotmail.fr> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
The list of offered Python versions is here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json It shows no Python 3.8 and Python 3.9 for macOS (Python for ARM64 platform). |
see actions/setup-python#850 workaround is to pin macos version to 3
Hello @ZeroIntensity |
It works, thanks Tested here: https://github.com/aio-libs/aiohttp-sse/actions/runs/8828949346?pr=488 |
Hi @HarithaVattikuti, I am still having trouble with Run actions/setup-python@v5
with:
python-version: 3.8
allow-prereleases: true
check-latest: false
token: ***
update-environment: true
env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_PYTHON_VERSION_WARNING: true
PIP_NO_WARN_SCRIPT_LOCATION: true
TOX_OVERRIDE: testenv.pass_env+=GITHUB_*,FORCE_COLOR
SETUPTOOLS_USE_DISTUTILS: local
Installed versions
Version ~3.8.0-0 was not found in the local cache
Version ~3.8.0-0 is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.8.10-8833490[2](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:2)98/python-[3](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:3).8.10-darwin-arm64.tar.gz"
Extract downloaded archive
/usr/bin/tar xz -C /Users/runner/work/_temp/c[4](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:4)9b1822-0f6f-4d2a-ae95-fdae63cc4323 -f /Users/runner/work/_temp/8c0d1b73-e480-404c-904b-98876ab86d14
Execute installation script
Check if Python hostedtoolcache folder exist...
Install Python binaries from prebuilt package
installer: Package name is Python
installer: Upgrading at base path /
installer: The upgrade was successful.
Create hostedtoolcach symlinks (Required for the backward compatibility)
Create Python 3.8.10 folder
Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
Upgrading pip...
Error: Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 203, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 130, in _get_module_details
spec = importlib.util.find_spec(mod_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/util.py", line 103, in find_spec
return _find_spec(fullname, parent_path)
File "<frozen importlib._bootstrap>", line 914, in _find_spec
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 79, in find_spec
return method()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 100, in spec_for_pip
if self.pip_imported_during_build():
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 111, in pip_imported_during_build
return any(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 112, in <genexpr>
frame.f_globals['__file__'].endswith('setup.py')
KeyError: '__file__'
Error: Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__main__.py", line [5](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:5), in <module>
sys.exit(ensurepip._main())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 20[6](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:6), in _main
return _bootstrap(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 125, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ensurepip/__init__.py", line 34, in _run_pip
return subprocess.run([sys.executable, "-c", code], check=True).returncode
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.8/bin/python', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/var/folders/3m/p59k4qdj0f1[7](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:7)st0gn2cmj3640000gn/T/tmpezbv7_yj/setuptools-56.0.0-py3-none-any.whl\', \'/var/folders/3m/p5[9](https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329#step:3:9)k4qdj0f17st0gn2cmj3640000gn/T/tmpezbv7_yj/pip-21.1.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmpezbv7_yj\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1. https://github.com/pypa/setuptools/actions/runs/8844957694/job/24287879211?pr=4329 |
Fix failing MacOS tests in CI Python 3.9 is not available on the latest MacOS images actions/setup-python#850 --------- Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* test: stick to macOS-13 to avoid python 3.7 missing for m1 chip; actions/setup-python#850
…tion term in Stouffers (#121) * Support precomputed correlation matrix for calculating variance inflation term in Stouffers * Update test_results.py * Switch to macos-12 per actions/setup-python#850 * Update test_results.py
Python 3.6-3.9 is no longer supported on `macos-latest`, which was recently updated to `macos-14-arm64` (see actions/setup-python#850 (comment)). - Target macOS runner platforms by supported Python version - Simplify specification of Ubuntu runners by moving `ubuntu-20.04` to an `include` statement
Python 3.6-3.9 is no longer supported on `macos-latest`, which was recently updated to `macos-14-arm64` (see actions/setup-python#850 (comment)). - Target macOS runner platforms by supported Python version - Simplify specification of Ubuntu runners by moving `ubuntu-20.04` to an `include` statement
Hello @ZeroIntensity, We are supporting python 3.8 and 3.9 versions for macos arm64 now. Please test your workflows. Closing this issue for now and let us know to reopen this issue if the you are still facing the issue. Hello @abravalheri, We have investigated the issue and we found that setup-python is successful on macos-latest. We have further more investigated by looking into your project about the issue and found that the file attribute is not found in the global scope of a module being used, which in this case is the setup.py file. The issue occurs in the context of the setup-python action when it tries to install setuptools and pip. The error is more likely to do with how the environment is configured in the action rather than the macOS version. name: Upgrade setuptools we can change the setup.py file in the repository, consider replacing it with pyproject.toml and setup.cfg. The pyproject.toml file is a newer, more robust method of managing Python package builds and dependencies. |
Hi @aparnajyothi-y thank you for investigating, but this explanation does not make much sense for me. You suggested installing the updated version of setuptools before the step that is failing... The problem with this suggestion that the problem that is failing is the installation of Python itself... So, how should I update stuff when Python is not installed yet? The step that is failing is very much the first one, it should not depend on the code inside the repository, right? The second suggestion about replacing
Please note that the problem is happening for the repository of setuptools itself. Maybe that is related? |
Description:
Python 3.8 and 3.9 on macOS no longer work, and actions complains about them not being a real version.
Action version:
Latest
Platform:
Runner type:
Tools version:
Python 3.8 - Python 3.9. It might be all versions <Python 3.10, but I haven't tested that.
Repro steps:
See this run from yesterday, vs this run from this morning on the same commit.
Expected behavior:
Python 3.8 and 3.9 should install on macOS
Actual behavior:
The following is logged to actions:
The text was updated successfully, but these errors were encountered: