qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Help installing pyqlib

Open mohamedelshami opened this issue 2 years ago • 7 comments

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:

  • Using pip install pyqlib

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

  • Install from source

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.

mohamedelshami avatar Jan 09 '24 17:01 mohamedelshami

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.

SunsetWolf avatar Jan 10 '24 03:01 SunsetWolf

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

mohamedelshami avatar Jan 10 '24 16:01 mohamedelshami

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.

SunsetWolf avatar Jan 11 '24 03:01 SunsetWolf

I tried both on Windows and Mac with conda environment

mohamedelshami avatar Jan 13 '24 12:01 mohamedelshami

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

akshaygulabrao avatar Jan 28 '24 22:01 akshaygulabrao

just support python <= 3.9

mrwang1992 avatar Mar 19 '24 11:03 mrwang1992