Skip to content

If python was installed via scoop, ggshield should be installed via pipx install ggshield --system-site-packages #894

Open
@BinToss

Description

It would be great if this pitfall was noted in ggshield's installation instructions.

Environment

  • ggshield version:
  • Operating system (Linux, macOS, Windows): Windows 11 Pro
  • Operating system version: 22H2 22621.3593
  • Python version: 3.12.3

Describe the bug

The scoop python package does not have ./Scripts/pip and instead bootstraps pip to site-packages.
The scoop pipx package does not automatically add --system-site-packages if pip is not in Python's Scripts directory. Subsequent pipx install runs will fail if pip is expected and --system-site-packages is not added.

> pipx install ggshield
No Python at '"C:\Python312\python.exe'
No Python at '"C:\Python312\python.exe'
Fatal error from pip prevented installation. Full pip output in file:
    C:\Users\Noah\pipx\logs\cmd_2024-05-22_20.04.23_pip_errors.log

Error installing ggshield.
> cat C:\Users\Noah\pipx\logs\cmd_2024-05-22_20.04.23_pip_errors.log
PIP STDOUT
----------

PIP STDERR
----------
C:\Users\Noah\pipx\venvs\ggshield\Scripts\python.exe: No module named pip

Steps to reproduce:

  1. scoop install python
  2. scoop install pipx
  3. pipx install ggshield

    fails

  4. pipx install ggshield --system-site-packages

    succeeds


Perhaps an issue should be raised over at https://github.com/pypa/pipx/issues (if one does not already exist) to address this programmatically.

Metadata

Assignees

No one assigned

    Labels

    status:newThis issue needs to be reviewedtype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions