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.
Related
I'm trying to install pyaudio with pipwin in a Python Django project in Windows 10.
I first run CMD as admin in Windows 10. Then I run the command:
pipwin install pyaudio
and I get the following error:
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
the full output from the command:
Package `pyaudio` found in cache
Downloading package . . .
https://download.lfd.uci.edu/pythonlibs/z4tqcw5k/PyAudio-0.2.11-cp38-cp38-win_amd64.whl
PyAudio-0.2.11-cp38-cp38-win_amd64.whl
Traceback (most recent call last):
File "C:\Users\...\AppData\Local\Programs\Python\Python38\Scripts\pipwin-script.py", line 11, in <module>
load_entry_point('pipwin==0.5.1', 'console_scripts', 'pipwin')()
File "c:\users\...\appdata\local\programs\python\python38\lib\site-packages\pipwin\command.py", line 103, in main
cache.install(package)
File "c:\users\...\appdata\local\programs\python\python38\lib\site-packages\pipwin\pipwin.py", line 300, in install
wheel_file = self.download(requirement)
File "c:\users\...\appdata\local\programs\python\python38\lib\site-packages\pipwin\pipwin.py", line 294, in download
return self._download(requirement, dest)
File "c:\users\...\appdata\local\programs\python\python38\lib\site-packages\pipwin\pipwin.py", line 290, in _download
obj.start()
File "c:\users\...\appdata\local\programs\python\python38\lib\site-packages\pySmartDL\pySmartDL.py", line 267, in start
urlObj = urllib.request.urlopen(req, timeout=self.timeout, context=self.context)
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "c:\users\...\appdata\local\programs\python\python38\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
Why can I not install pyaudio?
Thanks!
Update
I tried running this command now (pipwin´ doesn't seem to have the --no-cache-dir option`):
pip install pyaudio --no-cache-dir
and get the following error(s) and output:
Collecting pyaudio
Downloading 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\...\Documents\django\...\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\setup.py'"'"'; __file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\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\...\AppData\Local\Temp\pip-wheel-2z9ppsu6'
cwd: C:\Users\...\AppData\Local\Temp\pip-install-hmxqj031\pyaudio_26cdeab02ee14fec8d9e424e45453600\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\...\Documents\django\...\include -Ic:\users\...\appdata\local\programs\python\python38\include -Ic:\users\...\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\...\appdata\local\programs\python\python38\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.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit status 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\...\Documents\django\...\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\setup.py'"'"'; __file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\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\...\AppData\Local\Temp\pip-record-r1bi5b8i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\...\Documents\django\...\include\site\python3.8\pyaudio'
cwd: C:\Users\...\AppData\Local\Temp\pip-install-hmxqj031\pyaudio_26cdeab02ee14fec8d9e424e45453600\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\...\Documents\django\...\include -Ic:\users\...\appdata\local\programs\python\python38\include -Ic:\users\...\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\...\appdata\local\programs\python\python38\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.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\...\Documents\django\...\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\setup.py'"'"'; __file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-hmxqj031\\pyaudio_26cdeab02ee14fec8d9e424e45453600\\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\...\AppData\Local\Temp\pip-record-r1bi5b8i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\...\Documents\django\...\include\site\python3.8\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the 'C:\Users\...\Documents\django\...\Scripts\python.exe -m pip install --upgrade pip' command.
This is a problem not necessarily related to pyaudio. Try:
pipwin refresh
and then install what ever you want using pipwin.
This is because PIP is finding a source for pyaudio in its cache.
However the cache looks out of date or broken as the source it is finding is:
https://download.lfd.uci.edu/pythonlibs/z4tqcw5k/PyAudio-0.2.11-cp38-cp38-win_amd64.whlPyAudio-0.2.11-cp38-cp38-win_amd64.whl
Which gives a 404 if you visit it (as pip says).
You can run with --no-cache-dir to bypass the cache and hopefully reach out to a valid source..
See this thread for more info on the PIP cache
Removing pip's cache?
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.
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 ]```
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 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>