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

Failed installation on Debian 12 #7041

Open
Trikenstein opened this issue Mar 6, 2025 · 1 comment
Open

Failed installation on Debian 12 #7041

Trikenstein opened this issue Mar 6, 2025 · 1 comment

Comments

@Trikenstein
Copy link

uname -a
Linux myMachineName 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux

python3 --version
Python 3.11.2

pip3 --version
pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11)

pip3 install checkov failed with the following error. Same error whether the statement is executed with root or in userspace.

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-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. Make
sure you have python3-full installed.

If you wish to install a non-Debian 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.

See /usr/share/doc/python3.11/README.venv for more information.

The error message does hint about a possible fix with python3 -m venv path/to/venv. Unfortunately, I don't know Python at all. The suggested workaround is not documented in Checkov installation guide

@madduci
Copy link

madduci commented Mar 7, 2025

You need to perform the following steps on Debian 12:

python3 -m venv /path/to/venv/for/checkov
cd /path/to/venv/for/checkov
./bin/pip3 install checkov

Then register a symlink to checkov in /usr/local/bin

ln -s /path/to/venv/for/checkov/bin/checkov /usr/local/bin/checkov

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