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

Fails to install Qt on macos #230

Closed
MehdiChinoune opened this issue Mar 29, 2024 · 5 comments
Closed

Fails to install Qt on macos #230

MehdiChinoune opened this issue Mar 29, 2024 · 5 comments

Comments

@MehdiChinoune
Copy link
Contributor

MehdiChinoune commented Mar 29, 2024

Automatic cache miss, will cache this run
/usr/local/bin/brew install p7zip
Warning: p7zip 17.05 is already installed and up-to-date.
To reinstall 17.05, run:
  brew reinstall p7zip
/usr/local/bin/python3 -m pip install setuptools wheel py7zr==0.20.*
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-brew-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-brew packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error: Error: The process '/usr/local/bin/python3' failed with exit code 1

This started happening just recently

Runner Image
  Image: macos-13
  Version: 20240327.2
  Included Software: https://github.com/actions/runner-images/blob/macos-13/20240327.2/images/macos/macos-13-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20240327.2

It looks like Homebrew has implemented PEP-0668 https://peps.python.org/pep-0668/

@MehdiChinoune MehdiChinoune changed the title Fails to install Qt6 on macos-13 Fails to install Qt6 on macos Apr 2, 2024
@MehdiChinoune MehdiChinoune changed the title Fails to install Qt6 on macos Fails to install Qt on macos Apr 6, 2024
@pzhlkj6612
Copy link
Contributor

Hi! Could you please provide your workflow YAML file? A snippet about this action would be enough.

@MehdiChinoune
Copy link
Contributor Author

  macos:
    runs-on: macos-${{ matrix.macos_ver }}
    name: macos
    strategy:
      fail-fast: false
      matrix:
        QT_VER: [5.15, 6.6.3]
        macos_ver: [13, 14]
    env:
      HOMEBREW_NO_AUTO_UPDATE: 1
      HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1

    steps:
      - name: Install prerequisties
        run: |
          brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
          brew update
      - name: Install Qt
        uses: jurplel/install-qt-action@v3
        with:
          setup-python: false
          version: ${{ matrix.QT_VER }}
          dir: ${{ github.workspace }}/Qt
          archives: qtbase

brew link/unlink is a workaround a known issue actions/setup-python#577. Withou it only macos-14 fails

@MehdiChinoune
Copy link
Contributor Author

For anyone who hit the same issue. the only woraround I found is to install Qt from Homebrew.

I am closing the issue, Please don't reopen.

@MehdiChinoune MehdiChinoune closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@pzhlkj6612
Copy link
Contributor

Hi, @MehdiChinoune . Would you mind if others discuss the same problem here without re-opening this issue?

@MehdiChinoune
Copy link
Contributor Author

Please open a new issue. I don't want to get any notification about it.

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

2 participants