安装微软qlib的几个坑

折腾了一个上午,终于搞掂了qlib的安装。

第一种方案:pip install qlib。我的机器不支持,无法安装

第二种方案:通过源码安装。在源码安装前,装好所有依赖的库

pip install numpy
pip install --upgrade  cython
pip install scipy
pip install requests
pip install sacred
pip install python-socketio
安装cvxpy:conda install --channel https://conda.anaconda.org/conda-forge cvxpy
安装ruamel.yaml.clib:  conda install -c anaconda ruamel.yaml.clib
安装GCC: sudo apt-get install python3-dev,sudo apt-get install gcc
安装G++:sudo apt-get install g++
git clone https://github.com/microsoft/qlib.git && cd qlib
pip install .

基本就成本了。

如果过程中还会出现这种情况:Collecting python-socketio
  Using cached python_socketio-5.7.1-py3-none-any.whl (56 kB)

就是代表缺少这些依赖的库,同样装上去就可以了。

你可能感兴趣的:(python,linux,开发语言)