lundi 30 septembre 2019

import dlib ImportError: No module named dlib in Ubuntu 18.04

I am using .php file and calling one python file though Symfony Components which contains dlib and cv2. This python file works fine in terminal but calling from php file. It give an error.

Code

$process = Process::fromShellCommandline('python /home/machine/openface/demos/compare_two_pic.py {/home/machine/openface/demos/images/orange.jpg,/home/machine/openface/demos/images/orange.jpg}');

$process->run();

echo "here".$process->getOutput();

// executes after the command finishes
        if (!$process->isSuccessful()) {
            throw new ProcessFailedException($process);
        }

        echo $process->getOutput();

Error Output:

Traceback (most recent call last):

File "/home/machine/openface/demos/compare_two_pic.py", 
line 12, in <module>
import dlib
ImportError: No module named dlib


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2oRiM2V
via IFTTT

Aucun commentaire:

Enregistrer un commentaire