Skip to content

Difference between env.pythonLocation on macOS in Python 3.11+ #813

Open
@adamjstewart

Description

@adamjstewart

Description:

I'm encountering a strange issue related to caching the Python installation. I'm using actions/setup-python@v5.0.0 to install Python, then actions/cache@v4.0.0 to cache the env.pythonLocation directory, similar to this blog.

This works fantastically, except on macOS in Python 3.11 and 3.12, and I have no idea why. For some reason, the cache is empty, but only for those specific versions. Did anything change in the installation layout or env.pythonLocation variable that could explain this?

Action version:

5.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Python 3.11, 3.12

Repro steps:

The full workflow can be seen here.

Expected behavior:

I would expect this to work for all platforms/Python versions and cache the installed Python packages.

Actual behavior:

The cache is empty. See actions/cache#1176 for the cross-referenced bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions