Closed rdabc closed 3 months ago
I believe you are using the latest development version by cloning the repository. You need to run maturin develop
to compile the Rust backend library and install the package. Please see py-hftbacktest
directory.
I used "pip install hftbacktest"
Could you please send me the steps to install it? Thank you
If you install hftbacktest via pip
, it is v1.8.4
. If not, please update your Python to 3.10 or later. You can find the document here. If you want to try the latest development version, you need to install Rust, related development tools, and maturin
to build hftbacktest from the source.
I have Python3.10 After cloning the repository, Is the following correct
If you have installed Rust and related development tools to build Rust code, then you need to install maturin
using pip install maturin
. After that, if you run the command maturin develop
in py-hftbacktest
directory, it will build hftbacktest and install hftbacktest in the currently active Python environment.
I am getting this error:
error: failed to run custom build command for openssl-sys v0.9.103
.
.
maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.10-64bit" PYO3_PYTHON="/home/francois/Documents/Codes/rd_env/bin/python" PYTHON_SYS_EXECUTABLE="/home/francois/Documents/Codes/rd_env/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/francois/Documents/Codes/hftbacktest/py-hftbacktest/Cargo.toml" "--lib"
Thank you
You need to install openssl library. By the way, the latest development version is unstable. You may prefer to use the stable version v1.8.4.
2.0.0rc0 has been released. Now, you can install it pip install hftbacktest==2.0.0rc0
.
I have installed openss using the following: sudo apt install openssl and sudo apt install libssl-dev
I have checked the version of openssl: OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
However, I am still getting the same error.
Thank you
I have deleted the old version and cloned again the repo.
Now, I am getting this error:
💥 maturin failed
Caused by: Failed to read readme specified in pyproject.toml, which should be at /home/francois/Documents/Codes/hftbacktest/py-hftbacktest/README.rst
Caused by: failed to open file /home/francois/Documents/Codes/hftbacktest/py-hftbacktest/README.rst
Caused by: No such file or directory (os error 2)
I have copied "README.rst" file to "home/francois/Documents/Codes/hftbacktest/py-hftbacktest" and run maturin develop, I am getting the same error:
error: failed to run custom build command for openssl-sys v0.9.103
I have installed pkg-config (sudo apt install pkg-config) and it is working now. Thank you
Hi,
I am getting the following error in importing BacktestAsset
from hftbacktest import BacktestAsset, HashMapMarketDepthBacktest
Cell In[3], line 1 ----> 1 from hftbacktest import BacktestAsset, HashMapMarketDepthBacktest
ImportError: cannot import name 'BacktestAsset' from 'hftbacktest'
Thank you