diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eab6607b1c..e7b775bf4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,9 +39,11 @@ jobs: - name: Install Qlib with pip run: | if [ "$RUNNER_OS" == "Windows" ]; then - $CONDA\\python.exe -m pip install pyqlib --ignore-installed ruamel.yaml --user + $CONDA\\python.exe -m pip install numpy==1.19.5 + $CONDA\\python.exe -m pip install pyqlib --ignore-installed ruamel.yaml numpy --user else - sudo $CONDA/bin/python -m pip install pyqlib --ignore-installed ruamel.yaml + sudo $CONDA/bin/python -m pip install numpy==1.19.5 + sudo $CONDA/bin/python -m pip install pyqlib --ignore-installed ruamel.yaml numpy fi shell: bash diff --git a/README.md b/README.md index 787075d6ad..1c6d94ddd9 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,13 @@ This table demonstrates the supported Python version of `Qlib`: 2. For Python 3.9, `Qlib` supports running workflows such as training models, doing backtest and plot most of the related figures (those included in [notebook](examples/workflow_by_code.ipynb)). However, plotting for the *model performance* is not supported for now and we will fix this when the dependent packages are upgraded in the future. ### Install with pip +**Note**: Due to latest numpy release: version 1.20.0, unexpected errors will occur if you install or run Qlib with `numpy==1.20.0`. We recommend to use lower version of `numpy==1.19.5` for now and we will fix this incompatibility in the neaar future. + Users can easily install ``Qlib`` by pip according to the following command. ```bash - pip install pyqlib + pip install numpy==1.19.5 + pip install pyqlib --ignore-installed numpy ``` **Note**: pip will install the latest stable qlib. However, the main branch of qlib is in active development. If you want to test the latest scripts or functions in the main branch. Please install qlib with the methods below. diff --git a/setup.py b/setup.py index bac318c0f2..def59fb3ff 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ # What packages are required for this module to be executed? # `estimator` may depend on other packages. In order to reduce dependencies, it is not written here. REQUIRED = [ - "numpy>=1.12.0", + "numpy>=1.12.0,<=1.19.5", "pandas>=0.25.1", "scipy>=1.0.0", "requests>=2.18.0",