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

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

Open
ArthurSonzogni opened this issue Apr 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ArthurSonzogni
Copy link

ArthurSonzogni commented Apr 28, 2024

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: <https://peps.python.org/pep-0668/>
  
  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: <https://peps.python.org/pep-0668/>
  
  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: <https://peps.python.org/pep-0668/>
  
  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
Copy link
Owner

aminya commented Apr 29, 2024

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

@aminya aminya added the bug Something isn't working label Apr 29, 2024
@ArthurSonzogni
Copy link
Author

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
Copy link
Owner

aminya commented May 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants