aminya / setup-cpp

Install all the tools required for building and testing C++/C projects.
Apache License 2.0
177 stars 27 forks source link

error: externally-managed-environment - Error: gcovr failed to install #246

Open ArthurSonzogni opened 3 months ago

ArthurSonzogni commented 3 months ago

Hello, I am a happy user of your configuration.

This week, it started failing with the following error: https://github.com/ArthurSonzogni/FTXUI/actions/runs/8864887609/job/24343126194?pr=849

``` Installing gcovr 5.0 /opt/homebrew/bin/python3 --version Python 3.12.3 /opt/homebrew/bin/pip3 --version pip 24.0 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12) Installing pipx via pip 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 Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz If you wish to install a Python application that isn't in Homebrew, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. You can install pipx with brew install pipx You may restore the old behavior of pip by passing the '--break-system-packages' flag to pip, or by adding 'break-system-packages = true' to your pip.conf file. The latter will permanently disable this error. If you disable this error, we STRONGLY recommend that you additionally pass the '--user' flag to pip, or set 'user = true' in your pip.conf file. Failure to do this can result in a broken Homebrew installation. Read more about this behavior here: 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. Failed to install pipx via pip: Error: Command failed with exit code 1: /opt/homebrew/bin/python3 -m pip install --upgrade --user pipx. Warning: Failed to install pipx: Error: pipx was not installed correctly Error: Failed to install pipx via pip: Error: Command failed with exit code 1: /opt/homebrew/bin/python3 -m pip install --upgrade --user pipx.. Ignoring... Installing setuptools via pip 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 Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz If you wish to install a Python application that isn't in Homebrew, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. You can install pipx with brew install pipx You may restore the old behavior of pip by passing the '--break-system-packages' flag to pip, or by adding 'break-system-packages = true' to your pip.conf file. The latter will permanently disable this error. If you disable this error, we STRONGLY recommend that you additionally pass the '--user' flag to pip, or set 'user = true' in your pip.conf file. Failure to do this can result in a broken Homebrew installation. Read more about this behavior here: 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. Failed to install setuptools via pip: Error: Command failed with exit code 1: /opt/homebrew/bin/python3 -m pip install --upgrade --user setuptools. Warning: Failed to install setuptools or wheel: Error: Failed to install setuptools via pip: Error: Command failed with exit code 1: /opt/homebrew/bin/python3 -m pip install --upgrade --user setuptools.. Ignoring... Installing gcovr 5.0 via pip 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 Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz If you wish to install a Python application that isn't in Homebrew, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. You can install pipx with brew install pipx You may restore the old behavior of pip by passing the '--break-system-packages' flag to pip, or by adding 'break-system-packages = true' to your pip.conf file. The latter will permanently disable this error. If you disable this error, we STRONGLY recommend that you additionally pass the '--user' flag to pip, or set 'user = true' in your pip.conf file. Failure to do this can result in a broken Homebrew installation. Read more about this behavior here: 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. Failed to install gcovr via pip: Error: Command failed with exit code 1: /opt/homebrew/bin/python3 -m pip install --user gcovr==5.0. ```

Upvote & Fund

@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

Thank you in advance for helping prioritize & fund our backlog!


Fund with Polar

aminya commented 3 months ago

Is this a MacOS machine? Could you provide more information on the environment?

ArthurSonzogni commented 3 months ago

Yes. The link above provides the following information:

Current runner version: '2.316.0'
Operating System
  macOS
  14.4.1
  23E224
Runner Image
  Image: macos-14-arm64
  Version: 20240422.3
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240422.3/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3
Runner Image Provisioner
  2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be
aminya commented 3 months ago

Thanks for the information. I will look into this. I was on vacation.