Failed to install or update Checkov using pip. Error: while installing Visual Studio Code Checkov Extension in Microsoft Windows.
17416
Created On 04/19/22 18:48 PM - Last Modified 10/26/25 21:47 PM
Objective
Following errors can happen while installing Visual Studio Code Checkov Extension in Microsoft Windows.
-Failed to install or update Checkov using pip3
-Failed to install or update Checkov using pip
-Command failed: python3 --version\n'python3' is not recognized as an internal or external command
-Error: Command failed: python --version\n'python' is not recognized as an internal or external command
Example Error Output:
Checkov logs
[info]: Starting Checkov Extension. {"extensionVersion":"1.0.72","vscodeVersion":"1.65.2"}
[info]: Trying to install Checkov using Docker.
[debug]: Testing docker installation with command: docker pull bridgecrew/checkov:latest
[error]: Failed to install or update Checkov using Docker. Error: {"error":{"killed":false,"code":1,"signal":null,
"cmd":"docker pull bridgecrew/checkov:latest","message":"Command failed: docker pull bridgecrew/checkov:latest\n'docker' is not recognized as an internal or
external command,\r\noperable program or batch file.\r\n","stack":
"Error: Command failed: docker pull bridgecrew/checkov:latest\n'docker' is not recognized as an internal or external command,\r\noperable program or
batch file.\r\n\n\tat ChildProcess.exithandler
(child_process.js:317:12)\n\tat ChildProcess.emit (events.js:315:20)\n\tat maybeClose (internal/child_process.js:1048:16)\n\tat Socket.<anonymous>
(internal/child_process.js:439:11)\n\tat Socket.emit (events.js:315:20)\n\tat
Pipe.<anonymous> (net.js:673:12)"}}
[info]: Trying to install Checkov using pip3.
[debug]: Getting python version with command: python3 --version
[error]: Failed to install or update Checkov using pip3. Error: {"error":
{"killed":false,"code":1,"signal":null,"cmd":"python3 --
version","message":"Command failed: python3 --version\n'python3' is not recognized
as an internal or external command,\r\noperable program or batch
file.\r\n","stack":"Error: Command failed: python3 --version\n'python3' is not
recognized as an internal or external command,\r\noperable program or batch
file.\r\n\n\tat ChildProcess.exithandler (child_process.js:317:12)\n\tat
ChildProcess.emit (events.js:315:20)\n\tat maybeClose
(internal/child_process.js:1048:16)\n\tat Socket.<anonymous>
(internal/child_process.js:439:11)\n\tat Socket.emit (events.js:315:20)\n\tat
Pipe.<anonymous> (net.js:673:12)"}}
[info]: Retrying using `python` and `pip`
[debug]: Getting python version with command: python --version
[error]: Failed to install or update Checkov using pip. Error: {"error":
{"killed":false,"code":1,"signal":null,"cmd":"python --version","message":"Command
failed: python --version\n'python' is not recognized as an internal or external
command,\r\noperable program or batch file.\r\n","stack":"Error: Command failed:
python --version\n'python' is not recognized as an internal or external
command,\r\noperable program or batch file.\r\n\n\tat ChildProcess.exithandler
(child_process.js:317:12)\n\tat ChildProcess.emit (events.js:315:20)\n\tat
maybeClose (internal/child_process.js:1048:16)\n\tat Socket.<anonymous>
(internal/child_process.js:439:11)\n\tat Socket.emit (events.js:315:20)\n\tat
Pipe.<anonymous> (net.js:673:12)"}}
[info]: Trying to install Checkov using pipenv.
[debug]: Installation dir: c:\Users\USERNAME\AppData\Roaming\Code\User\globalStorage\bridgecrew.checkov\check
ov-installation
[debug]: Getting python version with command: pipenv run python --version
[error]: Failed to install or update Checkov using pipenv. Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"pipenv run python --
version","message":"Command failed: pipenv run python --version\n'pipenv' is not
recognized as an internal or external command,\r\noperable program or batch
file.\r\n","stack":"Error: Command failed: pipenv run python --version\n'pipenv'
is not recognized as an internal or external command,\r\noperable program or batch
file.\r\n\n\tat ChildProcess.exithandler (child_process.js:317:12)\n\tat
ChildProcess.emit (events.js:315:20)\n\tat maybeClose
(internal/child_process.js:1048:16)\n\tat Socket.<anonymous>
(internal/child_process.js:439:11)\n\tat Socket.emit (events.js:315:20)\n\tat
Pipe.<anonymous> (net.js:673:12)"}}
[warn]: All installation / update methods failed; attempting to fall back to a
global checkov installation
[error]: Could not find a global `checkov` executable either
[error]: Error occurred while preparing Checkov. Verify your settings, or try to
reload vscode. {"error":{"message":"Could not install Checkov.","stack":"Error:
Could not install Checkov.\n\tat
c:\\Users\\USERNAME\\.vscode\\extensions\\bridgecrew.checkov-
1.0.72\\out\\checkovInstaller.js:165:11\n\tat Generator.next (<anonymous>)\n\tat
fulfilled (c:\\Users\\USERNAME\\.vscode\\extensions\\bridgecrew.checkov-
1.0.72\\out\\checkovInstaller.js:24:58)"}}
Environment
- Prisma Cloud
- Code Security / Bridgecrew
- Microsoft Windows
- Visual Studio Code Checkov Extension
Procedure
From the python docs here – The MSI installer is the recommended path for windows installation.
https://www.python.org/downloads/release/python-3102/
Python is installed globally
Inside of Windows Environment variables paths are set for – User-level environment
System-level environment
Also through PowerShell –
This issue is with Powershell which is the default shell in Windows VS code.
Python3.10 MSI installation installs to the path in the variables(AppData\Local\Programs\Python) by default. It seems as though Powershell won’t load the environment set unless not only the env is set but the file path is also added to the PATH env variable.
Once you could get python variables to resolve correctly, Checkov still wouldn’t initialize unless using pip.
User variable PATH-
Which meant the documentation needed to be followed here - https://pip.pypa.io/en/stable/installation/ and an additional environment set for pip.
System variable PATH (needed for pip)
Once all of that is taken care of, checkov finally returns to a working state