qlib icon indicating copy to clipboard operation
qlib copied to clipboard

"Rolling.pyx" Error when doing "Python setup.py install" on colab

Open Rokeivin opened this issue 2 years ago • 1 comments

🐛 Bug Description

When using "! python setup.py install" on Colab for installation, I witnessed the following error:

running install running bdist_egg running egg_info writing pyqlib.egg-info/PKG-INFO writing dependency_links to pyqlib.egg-info/dependency_links.txt writing entry points to pyqlib.egg-info/entry_points.txt writing requirements to pyqlib.egg-info/requires.txt writing top-level names to pyqlib.egg-info/top_level.txt reading manifest file 'pyqlib.egg-info/SOURCES.txt' writing manifest file 'pyqlib.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext cythoning qlib/data/_libs/rolling.pyx to qlib/data/_libs/rolling.cpp error: /content/qlib/data/_libs/rolling.pyx

To Reproduce

Steps to reproduce the behavior:

  1. Open an empty notebook on Colab
  2. "! git clone https://github.com/microsoft/qlib.git && cd qlib"
  3. ! python /content/qlib/setup.py install

Expected Behavior

A successful installation

Screenshot

image

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information and paste them here directly.

  • Qlib version:
  • Python version: 3.7.3
  • OS (Windows, Linux, MacOS): Ubuntu 18.04.5 LTS

Additional Notes

I have seen a similar error description from issue #80 . However, the method in that issue doesn't seem to work for me. I also have updated my cython and nothing changed.

I have successfully installed qlib through pip. But I hope there is an alternative so that I can use the Dump function (the pip version doesn't contain).

Rokeivin avatar May 30 '22 16:05 Rokeivin

How about use "! cd qlib && pip install ." instead? I used this command to successfully install the latest version of Qlib by clone on Colab image

lzh222333 avatar Jun 08 '22 02:06 lzh222333