-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stasm error installing on Windows #43
Comments
Hi @ollietb stasm expects opencv3 to be installed. This article might help: https://www.learnopencv.com/install-opencv3-on-windows. A good test to see if opencv3 has been installed successfully is to run one of their examples: |
It's OK I managed to get it working using the dlib fork which was much easier to set up |
Hey I got the same problem trying to run this in a Anaconda environment. I followed all steps in https://www.learnopencv.com/install-opencv3-on-windows. I can compile the test app they mention (C++ RedEyeRemover), run the python equivalent of it and import cv2 in a python session without any errors. Still I fail to install stasm because of the same error that @ollietb had.
Where is stasm looking for these files? It is definitely in the PATH. |
Yeh, the problem is stasm not finding the openCV lib folder - its looking at My plan is to eventually switch stasm to dlib. |
I'm suffering with the same, related issue? alyssaq/stasm#4 Btw, https://pypi.org/project/facemorpher/ still points to stasm, probably would be good to put a link or a note there to use dlib instead. The problem then is that ERROR: Command errored out with exit status 1:
command: 'C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"'; __file__='"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\JANKA~1.WIS\AppData\Local\Temp\pip-wheel-jf_x9y6x'
cwd: C:\Users\JANKA~1.WIS\AppData\Local\Temp\pip-install-rbm_w60m\stasm_f40e238c30a04ed0a617b93678af83d7\
Complete output (32 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\stasm
copying stasm\__init__.py -> build\lib.win-amd64-3.7\stasm
running egg_info
writing stasm.egg-info\PKG-INFO
writing dependency_links to stasm.egg-info\dependency_links.txt
writing requirements to stasm.egg-info\requires.txt
writing top-level names to stasm.egg-info\top_level.txt
reading manifest file 'stasm.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'stasm.egg-info\SOURCES.txt'
creating build\lib.win-amd64-3.7\stasm\data
copying stasm\data\README.txt -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_frontalface_alt2.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_mcs_lefteye.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_mcs_righteye.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\testface.jpg -> build\lib.win-amd64-3.7\stasm\data
running build_ext
building '_stasm' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\mod_1
C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -I/usr/local/include -I/usr/local/Cellar/opencv/3.4.1_5/include -I/usr/local/include/opencv4 -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\include -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\include -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -c src\asm.cpp -o build\temp.win-amd64-3.7\Release\src\asm.o -std=c++11
In file included from src\asm.cpp:5:0:
src\stasm.h:33:30: fatal error: opencv2/opencv.hpp: No such file or directory
compilation terminated.
error: command 'C:\\Users\\janka.WISMAIN\\AppData\\Local\\Continuum\\anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for stasm
ERROR: Command errored out with exit status 1:
command: 'C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"'; __file__='"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\JANKA~1.WIS\AppData\Local\Temp\pip-record-_de8sxwp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\Include\stasm'
cwd: C:\Users\JANKA~1.WIS\AppData\Local\Temp\pip-install-rbm_w60m\stasm_f40e238c30a04ed0a617b93678af83d7\
Complete output (32 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\stasm
copying stasm\__init__.py -> build\lib.win-amd64-3.7\stasm
running egg_info
writing stasm.egg-info\PKG-INFO
writing dependency_links to stasm.egg-info\dependency_links.txt
writing requirements to stasm.egg-info\requires.txt
writing top-level names to stasm.egg-info\top_level.txt
reading manifest file 'stasm.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'stasm.egg-info\SOURCES.txt'
creating build\lib.win-amd64-3.7\stasm\data
copying stasm\data\README.txt -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_frontalface_alt2.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_mcs_lefteye.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\haarcascade_mcs_righteye.xml -> build\lib.win-amd64-3.7\stasm\data
copying stasm\data\testface.jpg -> build\lib.win-amd64-3.7\stasm\data
running build_ext
building '_stasm' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\mod_1
C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -I/usr/local/include -I/usr/local/Cellar/opencv/3.4.1_5/include -I/usr/local/include/opencv4 -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\include -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\include -IC:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -c src\asm.cpp -o build\temp.win-amd64-3.7\Release\src\asm.o -std=c++11
In file included from src\asm.cpp:5:0:
src\stasm.h:33:30: fatal error: opencv2/opencv.hpp: No such file or directory
compilation terminated.
error: command 'C:\\Users\\janka.WISMAIN\\AppData\\Local\\Continuum\\anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"'; __file__='"'"'C:\\Users\\JANKA~1.WIS\\AppData\\Local\\Temp\\pip-install-rbm_w60m\\stasm_f40e238c30a04ed0a617b93678af83d7\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\JANKA~1.WIS\AppData\Local\Temp\pip-record-_de8sxwp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\janka.WISMAIN\AppData\Local\Continuum\anaconda3\Include\stasm' Check the logs for full command output. |
I'm trying to install this on my Windows machine but I'm coming up against this error
Cannot open include file: 'opencv2/opencv.hpp': No such file or directory
. I've installed the opencv Windows library and tried copying the opencv2 header files over to the virtualenv includes folder, but they still aren't getting found.The text was updated successfully, but these errors were encountered: