1
  E:\Study\code\face_morpher-master\face_morpher-master>pip install stasm Collecting stasm
  Using cached https://files.pythonhosted.org/packages/a6/87/6a0fd3cb3c9d9ce65893e69f7e35a8822a2c819be11a802666c8469bb1bd/stasm-1.2.0.tar.gz
Requirement already satisfied: numpy>=1.7 in d:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages (from stasm) (1
.14.5)...`enter code here`
Building wheels for collected packages: stasm
  Running setup.py bdist_wheel for stasm ... error
  Complete output from command "d:\program files (x86)\microsoft visual studio\shared\python36_64\python.exe" -u -c "import setuptools, tokenize
;__file__='C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-274682qy\\stasm\\setup.py';f=getattr(tokenize, 'open', open)(__fi
le__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Public\Documents\Wondershare\
CreatorTemp\pip-wheel-qcp7btlf --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\stasm
  copying stasm\__init__.py -> build\lib.win-amd64-3.6\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.6\stasm\data
  copying stasm\data\README.txt -> build\lib.win-amd64-3.6\stasm\data
  copying stasm\data\haarcascade_frontalface_alt2.xml -> build\lib.win-amd64-3.6\stasm\data
  copying stasm\data\haarcascade_mcs_lefteye.xml -> build\lib.win-amd64-3.6\stasm\data
  copying stasm\data\haarcascade_mcs_righteye.xml -> build\lib.win-amd64-3.6\stasm\data
  copying stasm\data\testface.jpg -> build\lib.win-amd64-3.6\stasm\data
  running build_ext
  building '_stasm' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\src
  creating build\temp.win-amd64-3.6\Release\src\MOD_1
  D:\Ksoftware\Vs\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Id:\program files (x86)\microsoft visua
l studio\shared\python36_64\include" "-Id:\program files (x86)\microsoft visual studio\shared\python36_64\include" "-Id:\program files (x86)\mic
rosoft visual studio\shared\python36_64\lib\site-packages\numpy\core\include" -ID:\Ksoftware\Vs\VC\Tools\MSVC\14.14.26428\include "-IC:\Program
Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-ID:\Windows Kits\10\include\10.0.17134.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17134.0\
shared" "-ID:\Windows Kits\10\include\10.0.17134.0\um" "-ID:\Windows Kits\10\include\10.0.17134.0\winrt" "-ID:\Windows Kits\10\include\10.0.1713
4.0\cppwinrt" /EHsc /Tpsrc\asm.cpp /Fobuild\temp.win-amd64-3.6\Release\src\asm.obj /EHsc
  asm.cpp
  c:\users\public\documents\wondershare\creatortemp\pip-install-274682qy\stasm\src\stasm.h(33): fatal error C1083: 无法打开包括文件: “opencv2/o
pencv.hpp”: No such file or directory
  error: command 'D:\\Ksoftware\\Vs\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for stasm
  Running setup.py clean for stasm
Failed to build stasm
Installing collected packages: stasm
  Running setup.py install for stasm ... error
    Complete output from command "d:\program files (x86)\microsoft visual studio\shared\python36_64\python.exe" -u -c "import setuptools, tokeni
ze;__file__='C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-274682qy\\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 C:\Users\Public\Documents\Wondersh
are\CreatorTemp\pip-record-b54bw5rq\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\stasm
    copying stasm\__init__.py -> build\lib.win-amd64-3.6\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.6\stasm\data
    copying stasm\data\README.txt -> build\lib.win-amd64-3.6\stasm\data
    copying stasm\data\haarcascade_frontalface_alt2.xml -> build\lib.win-amd64-3.6\stasm\data
    copying stasm\data\haarcascade_mcs_lefteye.xml -> build\lib.win-amd64-3.6\stasm\data
    copying stasm\data\haarcascade_mcs_righteye.xml -> build\lib.win-amd64-3.6\stasm\data
    copying stasm\data\testface.jpg -> build\lib.win-amd64-3.6\stasm\data
    running build_ext
    building '_stasm' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\src
    creating build\temp.win-amd64-3.6\Release\src\MOD_1
    D:\Ksoftware\Vs\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Id:\program files (x86)\microsoft vis
ual studio\shared\python36_64\include" "-Id:\program files (x86)\microsoft visual studio\shared\python36_64\include" "-Id:\program files (x86)\m
icrosoft visual studio\shared\python36_64\lib\site-packages\numpy\core\include" -ID:\Ksoftware\Vs\VC\Tools\MSVC\14.14.26428\include "-IC:\Progra
m Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-ID:\Windows Kits\10\include\10.0.17134.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17134.
0\shared" "-ID:\Windows Kits\10\include\10.0.17134.0\um" "-ID:\Windows Kits\10\include\10.0.17134.0\winrt" "-ID:\Windows Kits\10\include\10.0.17
134.0\cppwinrt" /EHsc /Tpsrc\asm.cpp /Fobuild\temp.win-amd64-3.6\Release\src\asm.obj /EHsc
    asm.cpp
    c:\users\public\documents\wondershare\creatortemp\pip-install-274682qy\stasm\src\stasm.h(33): fatal error C1083: 无法打开包括文件: “opencv2
/opencv.hpp”: No such file or directory
    error: command 'D:\\Ksoftware\\Vs\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command ""d:\program files (x86)\microsoft visual studio\shared\python36_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\
Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-274682qy\\stasm\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().re
place('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-reco
rd-b54bw5rq\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Public\Documents\Wondershare\
CreatorTemp\pip-install-274682qy\stasm\

我已经安装了opencv,可以在pycharm中导入cv2。但是它告诉我找不到opencv.hpp。我使用 python 3.6.6 和 pycharm 2017,我使用命令 python -v;import cv2 ;检查从 'D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\cv2.pyd' 加载的 opencv 的位置扩展模块 'cv2'

从 'D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\cv2.pyd' 执行的扩展模块 'cv2'

import 'cv2' # <_frozen_importlib_external.ExtensionFileLoader object at 0x000001D058FD2BA8>,但错误来自位置 C:\Users\Public\Documents\Wondershare\ 那么我该怎么办。

4

0 回答 0