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.