I tried to install kmeans package but failed!
I've used so many different ways to solve the issue but none of them works. Hope that someone have idea of how to deal with the issue! Thanks a lot!!
The error message is as below
Collecting kmeans
Using cached https://files.pythonhosted.org/packages/d1/7e/87d12a99d7ccfd2c85b
19899012177e1718c2d6c0148fad421523160e84b/kmeans-1.0.2.tar.gz
Installing collected packages: kmeans
Running setup.py install for kmeans ... error
Complete output from command c:\users\AAA\appdata\local\programs\python\pyt
hon36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AAA\\A
ppData\\Local\\Temp\\pip-install-hjr78jwg\\kmeans\\setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(comp
ile(code, __file__, 'exec'))" install --record C:\Users\AAA\AppData\Local\Temp\
pip-record-rek9bpzw\install-record.txt --single-version-externally-managed --com
pile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\kmeans
copying kmeans\performance.py -> build\lib.win-amd64-3.6\kmeans
copying kmeans\tests.py -> build\lib.win-amd64-3.6\kmeans
copying kmeans\__init__.py -> build\lib.win-amd64-3.6\kmeans
running egg_info
writing kmeans.egg-info\PKG-INFO
writing dependency_links to kmeans.egg-info\dependency_links.txt
writing top-level names to kmeans.egg-info\top_level.txt
reading manifest file 'kmeans.egg-info\SOURCES.txt'
writing manifest file 'kmeans.egg-info\SOURCES.txt'
copying kmeans\lib.c -> build\lib.win-amd64-3.6\kmeans
running build_ext
building 'kmeans/lib' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\kmeans
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\AAA\appdata\local\programs\pytho
n\python36\include -Ic:\users\AAA\appdata\local\programs\python\python36\includ
e "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Progr
am Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x
86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\
include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tckmeans/
lib.c /Fobuild\temp.win-amd64-3.6\Release\kmeans/lib.obj -Wno-error=declaration-
after-statement -O3 -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-error=declara
tion-after-statement'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
IN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\AAA\appdata\local\programs\python\python36\python.exe -u -c "
import setuptools, tokenize;__file__='C:\\Users\\AAA\\AppData\\Local\\Temp\\pip
-install-hjr78jwg\\kmeans\\setup.py';f=getattr(tokenize, 'open', open)(__file__)
;code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe
c'))" install --record C:\Users\AAA\AppData\Local\Temp\pip-record-rek9bpzw\inst
all-record.txt --single-version-externally-managed --compile" failed with error
code 1 in C:\Users\AAA\AppData\Local\Temp\pip-install-hjr78jwg\kmeans\
====
Try downloading the .tar.gz file from pypi.org and then in cmd go to the directory with the file and do
pip install <file name>
Related
This question already has answers here:
PyAudio failed to install on Windows 10
(7 answers)
How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory"
(10 answers)
Closed 1 year ago.
C:\Users\lansz>pip install pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\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\lansz\AppData\Local\Temp\pip-wheel-661td9fy'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lansz\\AppData\\Local\\Temp\\pip-install-ttc_7ppq\\pyaudio\\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\users\lansz\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
============================================================
:c
I'm watching btw Tech With Tim's tutorial, the "Coronavirus Webscraper" video.
I don’t know what to do with my life and I’ve been suffering with it for 5 hours.
This might help, since it is the same problem you are having:
pyAudio failed to install : Windows 10
Basically you are missing some components you need before download pyaudio, and those are included by pipwin before installing so you don't have to do it yourself.
This question already has answers here:
How do I install PyAudio on Python 3.7?
(9 answers)
Closed 3 years ago.
I tried installing pyaudio using pip but I am getting an error.
C:\Users\divya>pip install pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
Complete output from command "c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\divya\\AppData\\Local\\Temp\\pip-install-5eoc_ykq\\pyaudio\\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\divya\AppData\Local\Temp\pip-record-xhzsi_4l\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT "-Ic:\program files (x86)\python37-32\include" "-Ic:\program files (x86)\python37-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.7\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\divya\\AppData\\Local\\Temp\\pip-install-5eoc_ykq\\pyaudio\\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\divya\AppData\Local\Temp\pip-record-xhzsi_4l\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\divya\AppData\Local\Temp\pip-install-5eoc_ykq\pyaudio\
please see this error and help me out I am getting similar error while installing pyGTK too. I tried upgrading pip too but nothing worked for me.
There is no prebuilt package for Python 3.7 on Windows (you have a 32 bit version probably) so you need to prepare build environment on your PC to use this package. Easier would be finding the wheel for 3.7 as some packages are quite hard to build on Windows.
You can find your wheel here
Check your python version and download your correct wheel
after that you can type to install:
pip install <yourwheel.whl>
i have installed the visual studio 2019 build tool , c++. Still i am having the problem in my cmd prompt, shown below.
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Complete output from command 'c:\users\nisith saha\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\NISITH~1\\AppData\\Local\\Temp\\pip-install-p2pi0hy3\\pyaudio\\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\NISITH~1\AppData\Local\Temp\pip-record-7qtci57w\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' 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
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DMS_WIN64=1 "-Ic:\users\nisith saha\appdata\local\programs\python\python37\include" "-Ic:\users\nisith saha\appdata\local\programs\python\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\nisith saha\appdata\local\programs\python\python37\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'c:\users\nisith saha\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\NISITH~1\\AppData\\Local\\Temp\\pip-install-p2pi0hy3\\pyaudio\\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\NISITH~1\AppData\Local\Temp\pip-record-7qtci57w\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\NISITH~1\AppData\Local\Temp\pip-install-p2pi0hy3\pyaudio\
You will also need the Portaudio development headers and libraries installed.
Instead of doing that, I think you'll find it easier to get the proper precompiled wheel for Py3.7 from Christoph Gohlke's site over here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
The wheel you'll want should be PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl. I won't hotlink to it since it's expressly discouraged by Gohlke.
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\
I already have installed opencv,and can import cv2 in pycharm.however it tolds me it can not find the opencv.hpp . I use python 3.6.6 ,and pycharm 2017,I use command python -v; import cv2 ;to check opencv's location extension module 'cv2' loaded from 'D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\cv2.pyd'
extension module 'cv2' executed from 'D:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\cv2.pyd'
import 'cv2' # <_frozen_importlib_external.ExtensionFileLoader object at 0x000001D058FD2BA8>,but the error is from location C:\Users\Public\Documents\Wondershare\
So how could I do .
I have been struggling to install Pyfst for days. After resolving the issue with vcvarsall and installing Visual Studio C++ tools, I ran into another issue, for which I cannot find the answer online (for Windows 7). I am trying to install it with PyCharm and I tried for both Python 2.7 and Python 3.5. I get this error:
Collecting pyfst
Using cached pyfst-0.2.3.tar.gz
Installing collected packages: pyfst
Running setup.py install for pyfst: started
Running setup.py install for pyfst: finished with status 'error'
Complete output from command C:\pyth\pythonw.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\...\\AppData\\Local\\Temp\\pycharm-packaging\\pyfst\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\...\AppData\Local\Temp\pip-ykez_6hi-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\fst
copying fst\__init__.py -> build\lib.win-amd64-3.5\fst
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'fst._fst' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\fst
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\pyth\include -IC:\pyth\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /EHsc /Tpfst/_fst.cpp /Fobuild\temp.win-amd64-3.5\Release\fst/_fst.obj -O2
_fst.cpp
fst/_fst.cpp(321): fatal error C1083: Cannot open include file: 'fst/symbol-table.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\pyth\pythonw.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\...\\AppData\\Local\\Temp\\pycharm-packaging\\pyfst\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\...\AppData\Local\Temp\pip-ykez_6hi-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\...\AppData\Local\Temp\pycharm-packaging\pyfst\
Can anyone help?
You might have better luck using the Python bindings that are included in OpenFST 1.5+.
http://www.openfst.org/twiki/bin/view/FST/PythonExtension