microsoft / qlib

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
https://qlib.readthedocs.io/en/latest/
MIT License
14.55k stars 2.53k forks source link

Help installing pyqlib #1731

Open mohamedelshami opened 5 months ago

mohamedelshami commented 5 months ago

I've made few attempts to install pyqlib using both pip install and build from source.

I use conda environments and tried with 3 different Python versions 3.8.15, 3.8.17 and 3.9.13.

The common issues encountered are:

Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement pyqlib (from versions: none) ERROR: No matching distribution found for pyqlib

Same error when trying Jupyter Notes with Google Collab: https://github.com/microsoft/qlib/blob/main/examples/workflow_by_code.ipynb

This

3.9

ERROR:: Could not find a local HDF5 installation. You may need to explicitly state where your local HDF5 headers and library can be found by setting the HDF5_DIR environment

3.8 RuntimeError: Scikit-learn requires Python 3.9 or later. The current Python version is 3.8.15 installed

Any pointers would be great.

SunsetWolf commented 5 months ago

To install qlib from source, first pull the code locally, then install numpy and cython: python -m pip install "numpy<=1.23.5" cython, and finally install qlib using python setup.py install. I don't know if your procedure is the same as the one I described, but I hope my answer will help you.

mohamedelshami commented 5 months ago

Thank you, I've tried your suggested instructions. I keep running into various library conflict errors which I'm not able to resolve.

Python 3.8.17

RuntimeError: Scikit-learn requires Python 3.9 or later. The current Python version is 3.8.17 installed in

Python 3.9.13 error: The 'pymongo==3.7.2' distribution was not found and is required by pyqlib

SunsetWolf commented 5 months ago

Not sure what system you are using? I tried installing it under ubuntu and windows and found no conflicts. Currently qlib support system include windows and linux.

mohamedelshami commented 5 months ago

I tried both on Windows and Mac with conda environment

akshaygulabrao commented 5 months ago

Try the following:

conda create -n qlib python=3.9 numpy pandas matplotlib pyyaml hdf5 requests -y
conda activate qlib
conda install - c conda-forge  lightgbm liblapack
mrwang1992 commented 3 months ago

just support python <= 3.9