alyssaq / face_morpher

:angel: Morph faces with Python, Numpy, Scipy
882 stars 233 forks source link

Fail to install facemorpher on Ubuntu 18.04 #60

Open veilupt opened 4 years ago

veilupt commented 4 years ago

I have a Ubuntu 18.04 and executed the packages from requirements.txt.

While installing facemorpher using the following command pip3 install facemorpher and getting the errors given below. I don't find opencv2 folder

Error Logs:

In file included from src/py_wrapper.cpp:13:0: src/stasm.h:33:10: fatal error: opencv2/opencv.hpp: No such file or directory

include "opencv2/opencv.hpp"

          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g5nna6ak/stasm/setup.py';f In file included from src/py_wrapper.cpp:13:0: src/stasm.h:33:10: fatal error: opencv2/opencv.hpp: No such file or directory

inc ----------------------------------------

lude "opencv2/opencv.hpp" ^~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-g5nna6ak/stasm/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-7nioxx18-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g5nna6ak/stasm/ =getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-7nioxx18-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g5nna6ak/stasm/`

veilupt commented 4 years ago

@alyssaq @javl @shichao-an @tschundler

wtjiang98 commented 4 years ago

@veilupt

I solved the problem by install the opencv via:

sudo apt-get install libopencv-dev python-opencv