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

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

Open
BinToss opened this issue May 23, 2024 · 1 comment
Labels
status:new This issue needs to be reviewed type:bug Something isn't working

Comments

@BinToss
Copy link

BinToss commented May 23, 2024

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.

@BinToss BinToss added status:new This issue needs to be reviewed type:bug Something isn't working labels May 23, 2024
@BinToss BinToss changed the title If python was installed via scoop, pipx install ggshield --system-site-packages to include pip If python was installed via scoop, ggshield should be installed via pipx install ggshield --system-site-packages May 23, 2024
@agateau-gg
Copy link
Collaborator

Hi @BinToss, sorry for the late reply. This looks like a bug in pipx in my opinion. Note that now that we have standalone binaries for ggshield (which do not require a Python interpreter to be installed), we could build a ggshield scoop package. This would make installation simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new This issue needs to be reviewed type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants