ModuleNotFoundError: No module named 'gvmtools'

I have installed gvm-tools using pip command- python3 -m pip install gvm-tools.
gvm-script works fine on terminal and gives output as show below-

Now I am running the script in php with exec command so I get an error as "ModuleNotFoundError: No module named ‘gvmtools’"

The code is as follows:

<?php
//application scan
if (isset($_POST['target1'])) {
$target=$_POST['ip'];
$name=$_POST['name'];
$user=$_POST['user'];
$password=$_POST['pass'];

$report= exec("~/.local/bin/gvm-script --gmp-username admin --gmp-password admin socket cred_applicationscan.py $target $name $user $password 2>&1");

echo "$report";
}

The output I get on click of application scan button is as follows:

Screenshot from 2020-11-07 12-01-53

Someone please help me in solving this error

Could you please stop creating duplicate Issues here and on Github? https://github.com/greenbone/gvm-tools/issues/330

1 Like

Your environment is probably not set up correctly.

1 Like

As said here multiple times, calling a shell script from PHP is a very bad idea in many cases. It is fully OFF-TOPIC and we do not support this.

So i will close this topic for your and the common good. Please read your related topics first before repeatedly posting such BS here.

1 Like