aws-cloudformation / aws-cloudformation/cfn-lint-visual-studio-code

/bin/sh: cfn-lint: command not found when installed in virtual environment virtualenv

Open
#211 8 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
289
Forks
170
PR merge metrics
No merged PRs in 30d

Description

I am getting the following error when viewed in the **Output** window at the bottom of vscode. I have latest stable vscode, with latest stable version of cfn-lint, with latest stable version of Cloudformation Linter extension.

```shell
Settings have been updated...
Settings: {"cfnLint":{"enableAutocomplete":true,"validateUsingJsonSchema":false,"path":"cfn-lint --ignore-checks E3012 E3031","appendRules":[],"ignoreRules":[],"overrideSpecPath":""}}
Determined this file is a CloudFormation Template. file:///home/felipe/repos/sdlf-cicd/template-cicd-child-foundations.yaml. Found the string AWSTemplateFormatVersion
Running... cfn-lint --ignore-checks E3012 E3031 --format,json,--,"/home/felipe/repos/sdlf-cicd/template-cicd-child-foundations.yaml"
/bin/sh: cfn-lint: command not found

child process exited with code 127 and signal null
```

I have cfn-lint installed in a virtual environment `~/.venv` using `python -m venv ~/.venv` and then `pip install --upgrade cfn-lint`.

* I have selected my .venv/bin/python to be my default interpreter
* I have tried to delete my venv, and create a new one, with same result

**OS** Windows 10
**WSL2** OpenSUSE 15.3
**cfn-lint --version** cfn-lint 0.56.4
**python** Python 3.6.15

```shell
which cfn-lint python python3
/home/felipe/.venv/bin/cfn-lint
/home/felipe/.venv/bin/python
/home/felipe/.venv/bin/python3
```

**VSCODE**
Version: 1.63.2 (user setup)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:40:02.816Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.