Skip to content

gsutil error #4220

Closed
Closed
@terriko

Description

@terriko

Hi @terriko on the venv part, I saw the same error for gsutil mentioned here. I.e.:

$ python -m venv venv
$ venv/bin/pip install cve-bin-tool
$ venv/bin/cve-bin-tool ...
...
FileNotFoundError: [Errno 2] No such file or directory: 'gsutil'

On debugging, I noticed that the tool currently expects gsutil on the PATH while I was running my command with an > absolute path for venv and not "activating" it. So, doing the following worked:

$ PATH=venv/bin venv/bin/cve-bin-tool
OR
$ source activate venv/bin/activate
$ cve-bin-tool ...

From a technical perspective, something that could be done here is to automatically add the sys.prefix to the PATH
Or attempt to find gsutil with shutil.which('gsutil') and if not available ... check if {sys.prefix}/bin/gsutil exists ?
Somewhere around: https://github.com/intel/cve-bin-tool/blob/v3.3/cve_bin_tool/data_sources/osv_source.py#L57

Originally posted by @AbdealiLoKo in #2869 (comment)

Moving this out of the original (closed) issue so it might actually get found and fixed by someone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions