1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 12:00:58 +08:00

add the cython import error log in repository directory

This commit is contained in:
bxdd
2020-09-29 21:30:04 +08:00
committed by you-n-g
parent 5bd8db724e
commit 76137308ab
3 changed files with 10 additions and 6 deletions

View File

@@ -28,7 +28,8 @@ Please follow the steps below to initialize ``Qlib``.
provider_uri = "~/.qlib/qlib_data/cn_data" # target_dir
qlib.init(provider_uri=provider_uri, region=REG_CN)
.. note::
Do not import qlib package in the repository directory of ``Qlib``, otherwise, errors may occur.
Parameters
-------------------

View File

@@ -27,9 +27,6 @@ Please follow the steps below to install ``Qlib``:
.. note::
It's recommended to use anaconda/miniconda to setup the environment. ``Qlib`` needs lightgbm and pytorch packages, use pip to install them.
.. note::
Do not import qlib in the root directory of ``Qlib``, otherwise, errors may occur.

View File

@@ -9,10 +9,16 @@ import numpy as np
import pandas as pd
from .base import Expression, ExpressionOps
from ._libs.rolling import rolling_slope, rolling_rsquare, rolling_resi
from ._libs.expanding import expanding_slope, expanding_rsquare, expanding_resi
from ..log import get_module_logger
try:
from ._libs.rolling import rolling_slope, rolling_rsquare, rolling_resi
from ._libs.expanding import expanding_slope, expanding_rsquare, expanding_resi
except ImportError as err:
print(err)
print('Do not import qlib package in the repository directory')
exit(-1)
__all__ = (
"Ref",
"Max",