Need help in python installing stasm on Window10 - python

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 .

Related

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

I have just installed Python 3.8.2 on a Windows 8.1 (64-bit).
When trying to install scikit-sparse module (python -m pip install scikit-sparse
) I get the below error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
The below is the full install script and failure:
Requirement already satisfied: numpy in c:\users\aldim_000\appdata\local\programs\python\python38\lib\site-packages (from scikit-sparse) (1.
18.2)
Requirement already satisfied: scipy in c:\users\aldim_000\appdata\local\programs\python\python38\lib\site-packages (from scikit-sparse) (1.
4.1)
Installing collected packages: scikit-sparse
Running setup.py install for scikit-sparse ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\aldim_000\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\aldim_000\\AppData\\Local\\Temp\\pip-install-3srmnkwv\\scikit-sparse\\setup.py'"'"'; __file__='"'"'C:\\Users\\aldim_000\\App
Data\\Local\\Temp\\pip-install-3srmnkwv\\scikit-sparse\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repl
ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\aldim_000\AppData\Loca
l\Temp\pip-record-muu60ly9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\aldim_000\AppData\L
ocal\Programs\Python\Python38\Include\scikit-sparse'
cwd: C:\Users\aldim_000\AppData\Local\Temp\pip-install-3srmnkwv\scikit-sparse\
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\sksparse
copying sksparse\test_cholmod.py -> build\lib.win-amd64-3.8\sksparse
copying sksparse\_version.py -> build\lib.win-amd64-3.8\sksparse
copying sksparse\__init__.py -> build\lib.win-amd64-3.8\sksparse
creating build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\illc1033.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\illc1033_rhs1.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\illc1850.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\illc1850_rhs1.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\well1033.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\well1033_rhs1.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\well1850.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
copying sksparse\test_data\well1850_rhs1.mtx.gz -> build\lib.win-amd64-3.8\sksparse\test_data
UPDATING build\lib.win-amd64-3.8\sksparse/_version.py
set build\lib.win-amd64-3.8\sksparse/_version.py to '0.4.4'
running build_ext
skipping 'sksparse\cholmod.c' Cython extension (up-to-date)
building 'sksparse.cholmod' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\sksparse
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\aldim_000\App
Data\Local\Programs\Python\Python38\lib\site-packages\numpy\core\include -IC:\Users\aldim_000\AppData\Local\Programs\Python\Python38/include
-I/usr/include/suitesparse -IC:\Users\aldim_000\AppData\Local\Programs\Python\Python38\include -IC:\Users\aldim_000\AppData\Local\Programs\
Python\Python38\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\NETFXSD
K\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" /Tcsksparse\cholmod.c /Fobuild\temp.win-amd64-3.8\Release\sksparse\cholmod.obj
cholmod.c
c:\users\aldim_000\appdata\local\programs\python\python38\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warn
ing Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\aldim_000\appdata\local\temp\pip-install-3srmnkwv\scikit-sparse\sksparse\cholmod_backward_compatible.h(1): fatal error C1083: C
annot open include file: 'cholmod.h': No such file or directory
c:\users\aldim_000\appdata\local\programs\python\python38\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Wa
ing Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\aldim_000\appdata\local\temp\pip-install-3srmnkwv\scikit-sparse\sksparse\cholmod_backward_compatible.h(1): fatal error C1083:
annot open include file: 'cholmod.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\aldim_000\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, s
uptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aldim_000\\AppData\\Local\\Temp\\pip-install-3srmnkwv\\scikit-sparse\\setup.py'"'"'; __fi
__='"'"'C:\\Users\\aldim_000\\AppData\\Local\\Temp\\pip-install-3srmnkwv\\scikit-sparse\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',
pen)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --reco
'C:\Users\aldim_000\AppData\Local\Temp\pip-record-muu60ly9\install-record.txt' --single-version-externally-managed --compile --install-he
ers 'C:\Users\aldim_000\AppData\Local\Programs\Python\Python38\Include\scikit-sparse' Check the logs for full command output.

How do i install pycairo Im on windows and this is the error i get when trying to install through pip

so like what do i do ? and if the answer to download it manually what do i need to do next ? i am using pycharm . i dont really know what a wheel is or what is GTK /..... but i wanted to install cairo so that i could use manim . Thanks for any and all help.
Collecting pycairo
Using cached https://files.pythonhosted.org/packages/3c/1a/c0478ecab31baae50fda9956547788afbd0ca5
63adc52c9b03cab30f17eb/pycairo-1.18.2.tar.gz
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
Complete output from command C:\Users\User\PycharmProjects\hello\venv\Scripts\python.exe -u -c
"import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-4lgps5e9\
\pycairo\\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\User\AppData\Local\Temp
\pip-record-p805hmez\install-record.txt --single-version-externally-managed --compile --install-hea
ders C:\Users\User\PycharmProjects\hello\venv\include\site\python3.7\pycairo:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cairo
copying cairo\__init__.py -> build\lib.win32-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
copying cairo\py.typed -> build\lib.win32-3.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hos
tX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MIN
OR=18 -DPYCAIRO_VERSION_MICRO=2 -IC:\Users\User\PycharmProjects\hello\venv\include -IC:\Users\User\
AppData\Local\Programs\Python\Python37-32\include -IC:\Users\User\AppData\Local\Programs\Python\Pyt
hon37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.
22.27905\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\1
0\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" /Tccairo/device.c /Fobuild\t
emp.win32-3.7\Release\cairo/device.obj
device.c
C:\Users\User\AppData\Local\Temp\pip-install-4lgps5e9\pycairo\cairo\pycairo.h(37): fatal error
C1083: Cannot open include file: 'cairo.h': No s
uch file or directory
error: command 'C:\\Program Files (x86)\\Mic
rosoft Visual Studio\\2019\\Community\\VC\\Tools
\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe'
failed with exit status 2 ]```

Python pip install appkit

I'm using python 3.6 and wanted to install appkit
I paste last logs. I tryed everything.
I got installed Visual Studio 2015.
I'm using Windows 7
creating build\temp.win-amd64-3.6\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_
MINOR=17 -DPYCAIRO_VERSION_MICRO=0 -Ic:\python36\include -Ic:\python36\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.10586.0\ucrt" "-IC:\Program Files (x86)\Windo
ws Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\inc
lude\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0
.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winr
t" /Tccairo/device.c /Fobuild\temp.win-amd64-3.6\Release\cairo/device.obj
device.c
c:\users\rafal\appdata\local\temp\pip-install-l744mfh7\pycairo\cairo\pycairo
.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or
directory
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:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\rafal\\AppData\\Local\\Temp\\pip-install-l744mfh7\\pycairo\\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\rafal\A
ppData\Local\Temp\pip-record-r_uz_0uc\install-record.txt --single-version-extern
ally-managed --compile" failed with error code 1 in C:\Users\rafal\AppData\Local
\Temp\pip-install-l744mfh7\pycairo\
pip install pygobject
Collecting pygobject
Using cached https://files.pythonhosted.org/packages/e0/e8/1e4f21800015a9ca153
969e85fc29f7962f8f82fc5dbc1ecbdeb9dc54c75/PyGObject-3.28.3.tar.gz
Requirement already satisfied: pycairo>=1.11.1 in c:\python36\lib\site-packages
(from pygobject) (1.16.3)
Installing collected packages: pygobject
Running setup.py install for pygobject ... error
Complete output from command c:\python36\python.exe -u -c "import setuptools
, tokenize;__file__='C:\\Users\\rafal\\AppData\\Local\\Temp\\pip-install-ijzat7z
3\\pygobject\\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\rafal\AppData\Local\Temp\pip-record-ded1xvyr\install-record.t
xt --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\pygtkcompat
copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.6\pygtkcomp
at
copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.6\pygtkcompat
copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.6\pygtkcompat
creating build\lib.win-amd64-3.6\gi
copying gi\docstring.py -> build\lib.win-amd64-3.6\gi
copying gi\importer.py -> build\lib.win-amd64-3.6\gi
copying gi\module.py -> build\lib.win-amd64-3.6\gi
copying gi\pygtkcompat.py -> build\lib.win-amd64-3.6\gi
copying gi\types.py -> build\lib.win-amd64-3.6\gi
copying gi\_constants.py -> build\lib.win-amd64-3.6\gi
copying gi\_error.py -> build\lib.win-amd64-3.6\gi
copying gi\_option.py -> build\lib.win-amd64-3.6\gi
copying gi\_ossighelper.py -> build\lib.win-amd64-3.6\gi
copying gi\_propertyhelper.py -> build\lib.win-amd64-3.6\gi
copying gi\_signalhelper.py -> build\lib.win-amd64-3.6\gi
copying gi\__init__.py -> build\lib.win-amd64-3.6\gi
creating build\lib.win-amd64-3.6\gi\repository
copying gi\repository\__init__.py -> build\lib.win-amd64-3.6\gi\repository
creating build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.6\gi\ove
rrides
copying gi\overrides\Gio.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\GLib.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\GObject.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\Pango.py -> build\lib.win-amd64-3.6\gi\overrides
copying gi\overrides\__init__.py -> build\lib.win-amd64-3.6\gi\overrides
running build_ext
pycairo: new API
pycairo: trying include directory: 'c:\\python36\\lib\\site-packages\\cairo'
pycairo: header file ('c:\\python36\\lib\\site-packages\\cairo\\py3cairo.h')
not found
pycairo: old API
pycairo: found pycairo 1.16.3 (c:\python36\lib\site-packages)
pycairo: trying include directory: 'c:\\python36\\include\\pycairo'
pycairo: header file ('c:\\python36\\include\\pycairo\\py3cairo.h') not foun
d
pycairo: pkg-config
error: Could not find pycairo headers
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\rafal\\AppData\\Local\\Temp\\pip-install-ijzat7z3\\pygobject\\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\rafal
\AppData\Local\Temp\pip-record-ded1xvyr\install-record.txt --single-version-exte
rnally-managed --compile" failed with error code 1 in C:\Users\rafal\AppData\Loc
al\Temp\pip-install-ijzat7z3\pygobject\
C:\Users\rafal\Downloads>pip install pycairo
Requirement already satisfied: pycairo in c:\python36\lib\site-packages (1.16.3)
I downloaded GTK , by using this tutorial
https://www.gtk.org/download/windows.php
And PygoObject by using this tutorial:
http://pygobject.readthedocs.io/en/latest/getting_started.html
Can you help?
appkit on Windows uses PyGObject which requires PyCairo which requires cairo which you don't have. You have to install cairo with sources.

Python kmeans package installation failure

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>

How do I install QuickFix for Python?

I tried to install QuickFix using pip install quickfix as suggested on their site.
However, during installation I get the error:
C++\Acceptor.cpp(21) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
As far as I understand stdafx.h is a precompiled C++ header. So where can I get my hands on this file and how can I tell pip where to find it?
The full pip log is given below for reference:
------------------------------------------------------------
C:\Program Files (x86)\Python27\lib\site-packages\pip\__main__.py run on 04/25/16 23:14:35
Downloading/unpacking quickfix
Getting page https://pypi.python.org/simple/quickfix/
URLs to search for versions for quickfix:
* https://pypi.python.org/simple/quickfix/
Analyzing links from page https://pypi.python.org/simple/quickfix/
Found link https://pypi.python.org/packages/63/6e/842f5fcaae56f6a992f6a4e962e256327a85e31f49cd18ef6785d71dcc11/quickfix-1.14.2.tar.gz#md5=9412b4c496403408f5cd3864a74be86f (from https://pypi.python.org/simple/quickfix/), version: 1.14.2
Found link https://pypi.python.org/packages/8c/e1/0943a3ae87d5c9e13d97ff66e3f0d110dac3450c3b137c8fc3b61128f72a/quickfix-1.14.1.tar.gz#md5=6944d6c0840a3157eb5dae1552a7a3a6 (from https://pypi.python.org/simple/quickfix/), version: 1.14.1
Found link https://pypi.python.org/packages/d4/73/88e00fab6aec1b5ca10816b294b351e3af2f6fc6fbf08f8c48b3ffaf60cb/quickfix-1.14.3.tar.gz#md5=6a4085d95e30af2c93e75d8e5b08d921 (from https://pypi.python.org/simple/quickfix/), version: 1.14.3
Using version 1.14.3 (newest of versions: 1.14.3, 1.14.2, 1.14.1)
Downloading from URL https://pypi.python.org/packages/d4/73/88e00fab6aec1b5ca10816b294b351e3af2f6fc6fbf08f8c48b3ffaf60cb/quickfix-1.14.3.tar.gz#md5=6a4085d95e30af2c93e75d8e5b08d921 (from https://pypi.python.org/simple/quickfix/)
Running setup.py (path:c:\users\admin\appdata\local\temp\pip_build_Admin\quickfix\setup.py) egg_info for package quickfix
running egg_info
creating pip-egg-info\quickfix.egg-info
writing pip-egg-info\quickfix.egg-info\PKG-INFO
writing top-level names to pip-egg-info\quickfix.egg-info\top_level.txt
writing dependency_links to pip-egg-info\quickfix.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\quickfix.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\quickfix.egg-info\SOURCES.txt'
writing manifest file 'pip-egg-info\quickfix.egg-info\SOURCES.txt'
Source in c:\users\admin\appdata\local\temp\pip_build_admin\quickfix has version 1.14.3, which satisfies requirement quickfix
Installing collected packages: quickfix
Running setup.py install for quickfix
Running command "C:\Program Files (x86)\Python27\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\admin\\appdata\\local\\temp\\pip_build_Admin\\quickfix\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-ulak1y-record\install-record.txt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
copying quickfix.py -> build\lib.win32-2.7
copying quickfixt11.py -> build\lib.win32-2.7
copying quickfix40.py -> build\lib.win32-2.7
copying quickfix41.py -> build\lib.win32-2.7
copying quickfix42.py -> build\lib.win32-2.7
copying quickfix43.py -> build\lib.win32-2.7
copying quickfix44.py -> build\lib.win32-2.7
copying quickfix50.py -> build\lib.win32-2.7
copying quickfix50sp1.py -> build\lib.win32-2.7
copying quickfix50sp2.py -> build\lib.win32-2.7
running build_ext
Testing for std::tr1::shared_ptr...
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
test_std_tr1_shared_ptr.cpp
test_std_tr1_shared_ptr.cpp(1) : fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
...not found
Testing for std::shared_ptr...
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe -std=c++0x /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_shared_ptr.cpp
test_std_shared_ptr.cpp(5) : error C2039: 'shared_ptr' : is not a member of 'std'
test_std_shared_ptr.cpp(5) : error C2065: 'shared_ptr' : undeclared identifier
test_std_shared_ptr.cpp(5) : error C2062: type 'int' unexpected
...not found
building '_quickfix' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\C++
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /TpC++\Acceptor.cpp /Fobuild\temp.win32-2.7\Release\C++\Acceptor.obj -std=c++0x
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
Acceptor.cpp
C++\Acceptor.cpp(21) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
error: command 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
Complete output from command "C:\Program Files (x86)\Python27\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\admin\\appdata\\local\\temp\\pip_build_Admin\\quickfix\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-ulak1y-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
copying quickfix.py -> build\lib.win32-2.7
copying quickfixt11.py -> build\lib.win32-2.7
copying quickfix40.py -> build\lib.win32-2.7
copying quickfix41.py -> build\lib.win32-2.7
copying quickfix42.py -> build\lib.win32-2.7
copying quickfix43.py -> build\lib.win32-2.7
copying quickfix44.py -> build\lib.win32-2.7
copying quickfix50.py -> build\lib.win32-2.7
copying quickfix50sp1.py -> build\lib.win32-2.7
copying quickfix50sp2.py -> build\lib.win32-2.7
running build_ext
Testing for std::tr1::shared_ptr...
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
test_std_tr1_shared_ptr.cpp
test_std_tr1_shared_ptr.cpp(1) : fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
...not found
Testing for std::shared_ptr...
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe -std=c++0x /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_shared_ptr.cpp
test_std_shared_ptr.cpp(5) : error C2039: 'shared_ptr' : is not a member of 'std'
test_std_shared_ptr.cpp(5) : error C2065: 'shared_ptr' : undeclared identifier
test_std_shared_ptr.cpp(5) : error C2062: type 'int' unexpected
...not found
building '_quickfix' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\C++
C:\Users\Admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC++ "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /TpC++\Acceptor.cpp /Fobuild\temp.win32-2.7\Release\C++\Acceptor.obj -std=c++0x
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
Acceptor.cpp
C++\Acceptor.cpp(21) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
error: command 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\admin\appdata\local\temp\pip_build_Admin...
Command "C:\Program Files (x86)\Python27\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\admin\\appdata\\local\\temp\\pip_build_Admin\\quickfix\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-ulak1y-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\admin\appdata\local\temp\pip_build_Admin\quickfix
Exception information:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Program Files (x86)\Python27\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Program Files (x86)\Python27\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Program Files (x86)\Python27\lib\site-packages\pip\req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Program Files (x86)\Python27\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command "C:\Program Files (x86)\Python27\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\admin\\appdata\\local\\temp\\pip_build_Admin\\quickfix\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-ulak1y-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\admin\appdata\local\temp\pip_build_Admin\quickfix
I never could figure out this problem. Instead I went here and downloaded it. Should work for you too.

Categories