abbass2 / pyqstrat

A fast, extensible, transparent python library for backtesting quantitative strategies.
BSD 3-Clause "New" or "Revised" License
353 stars 57 forks source link

pip installation of pyqstrat fails on windows 10; missing .h files #9

Closed multiquant closed 4 years ago

multiquant commented 5 years ago

I installed pyqstrat on windows 10, and ran pip to install it . I installed Microsoft Visual Studio build tools prior to running pip. I get the following error during pip install:

C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\pyqstrat\cpp\arrow_writer.hpp(8): fatal error C1083: Cannot open include file: 'arrow/api.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

----------------------------------------

Command "C:\Users\Andrei\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\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\Andrei\AppData\Local\Temp\pip-do9vwj3i-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\ You are using pip version 9.0.1, however version 19.0.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

The error essentially says that file 'arrow/api.h' cannot be found. I looked inside the archive pyqstrat-0.2.15.tar.gz (which I unzipped) and I see a file arrow.hpp inside cpp folder , that has a line #include <arrow/api.h> in it. However there is no folder "arrow" or file api.h anywhere inside the archive. So it appears that some C++ files (headers) and folders that contain them are missing from the installation archive

abbass2 commented 5 years ago

Hi

Please make sure you have boost-cpp and arrow-cpp installed and the version of arrow-cpp is greater than or equal to 0.12.1.

See the readme at https://github.com/abbass2/pyqstrat https://github.com/abbass2/pyqstrat for details. Run the following for your anaconda environment.

conda install boost-cpp arrow-cpp -c conda-forge

Best,

Sal

On Apr 10, 2019, at 3:27 PM, multiquant notifications@github.com wrote:

I installed pyqstrat on windows 10, and ran pip to install it . I installed Microsoft Visual Studio build tools prior to running pip. I get the following error during pip install:

C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\pyqstrat\cpp\arrow_writer.hpp(8): fatal error C1083: Cannot open include file: 'arrow/api.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2


Command "C:\Users\Andrei\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\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\Andrei\AppData\Local\Temp\pip-do9vwj3i-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat You are using pip version 9.0.1, however version 19.0.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

The error essentially says that file 'arrow/api.h' cannot be found. I looked inside the archive pyqstrat-0.2.15.tar.gz (which I unzipped) and I see a file arrow.hpp inside cpp folder , that has a line #include <arrow/api.h> in it. However there is no folder "arrow" or file api.h anywhere inside the archive. So it appears that some C++ files (headers) and folders that contain them are missing from the installation archive

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/abbass2/pyqstrat/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AETdV29IHR5oIU_mCcqCu42dzoKkOQ-Fks5vfklAgaJpZM4coL_x.

multiquant commented 5 years ago

Sal hello

Thank you for your advice. I implemented it following all instructions on installation. The install is fine now , there are no errors. However when I run the Jupyter notebook that you have provided, I get the following error , that is produced by the line "import pyqstrat":

ImportError Traceback (most recent call last) in 7 import os 8 ----> 9 import pyqstrat as pq 10 11 pq.set_defaults() # Set some display defaults to make dataframes and plots easier to look at ~\Anaconda3\lib\site-packages\pyqstrat__init__.py in 10 from pyqstrat.plot import 11 from pyqstrat.evaluator import ---> 12 from pyqstrat.pyqstrat_cpp import 13 from pyqstrat.marketdata_processor import 14 ImportError: DLL load failed: The specified procedure could not be found.

My setup is this :

1) Windows 10

2) Anaconda 5.0.1

3) Pyarrow 0.13.0

4) Python 3.6.3

Would you have any advice on what to do?

Should I post this problem on Github?

With best regards

Andrei Gerasimov

On Wed, Apr 10, 2019 at 4:32 PM sal notifications@github.com wrote:

Hi

Please make sure you have boost-cpp and arrow-cpp installed and the version of arrow-cpp is greater than or equal to 0.12.1.

See the readme at https://github.com/abbass2/pyqstrat < https://github.com/abbass2/pyqstrat> for details. Run the following for your anaconda environment.

conda install boost-cpp arrow-cpp -c conda-forge

Best,

Sal

On Apr 10, 2019, at 3:27 PM, multiquant notifications@github.com wrote:

I installed pyqstrat on windows 10, and ran pip to install it . I installed Microsoft Visual Studio build tools prior to running pip. I get the following error during pip install:

C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\pyqstrat\cpp\arrow_writer.hpp(8): fatal error C1083: Cannot open include file: 'arrow/api.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2


Command "C:\Users\Andrei\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat\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\Andrei\AppData\Local\Temp\pip-do9vwj3i-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Andrei\AppData\Local\Temp\pip-build-dww8vkw7\pyqstrat You are using pip version 9.0.1, however version 19.0.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

The error essentially says that file 'arrow/api.h' cannot be found. I looked inside the archive pyqstrat-0.2.15.tar.gz (which I unzipped) and I see a file arrow.hpp inside cpp folder , that has a line #include <arrow/api.h> in it. However there is no folder "arrow" or file api.h anywhere inside the archive. So it appears that some C++ files (headers) and folders that contain them are missing from the installation archive

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/abbass2/pyqstrat/issues/9>, or mute the thread < https://github.com/notifications/unsubscribe-auth/AETdV29IHR5oIU_mCcqCu42dzoKkOQ-Fks5vfklAgaJpZM4coL_x .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abbass2/pyqstrat/issues/9#issuecomment-481850747, or mute the thread https://github.com/notifications/unsubscribe-auth/AvNGItKlh7vGDten2R4XHd-QQRaVto0Rks5vfkpjgaJpZM4coL_x .