qlib
qlib copied to clipboard
downloading data problem -- undefined symbol: _ZSt28__throw_bad_array_new_lengthv
my envs are python3.9.7 cython 0.29.28 gcc 11.2 linux ubuntu_64
when I download cn data in qlib dir by command " python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --region cn" I got a problem:
Do not import qlib package in the repository directory in case of importing qlib from . without compiling
Traceback (most recent call last):
File "/home/yqm/Programs/qlib/scripts/get_data.py", line 5, in
I tried command " python setup.py build_ext --inplace " it backs
skipping 'qlib/data/_libs/rolling.cpp' Cython extension (up-to-date) skipping 'qlib/data/_libs/expanding.cpp' Cython extension (up-to-date) copying build/lib.linux-x86_64-3.9/qlib/data/_libs/rolling.cpython-39-x86_64-linux-gnu.so -> qlib/data/_libs copying build/lib.linux-x86_64-3.9/qlib/data/_libs/expanding.cpython-39-x86_64-linux-gnu.so -> qlib/data/_libs
but it didn't work , so I need help!
I resolved this error by
sudo apt remove gcc-11 g++-11
sudo apt install gcc-10 g++10
in your qlib dir
sudo python setup.py install
I resolved this error by
sudo apt remove gcc-11 g++-11 sudo apt install gcc-10 g++10
in your qlib dir
sudo python setup.py install
I tried buy it doesnt seems to be working. Any other workarounds ? https://hjlabs.in/
check qlib/build has been upgraded or not. If upgrade, if you use a Pycharm, may be you need run
python setup.py build_ext --inplace
check qlib/build has been upgraded or not. If upgrade, if you use a Pycharm, may be you need run
python setup.py build_ext --inplace
It gives me output like this.
running build_ext
skipping 'qlib/data/_libs/rolling.cpp' Cython extension (up-to-date)
skipping 'qlib/data/_libs/expanding.cpp' Cython extension (up-to-date)
copying build/lib.linux-x86_64-3.8/qlib/data/_libs/rolling.cpython-38-x86_64-linux-gnu.so -> qlib/data/_libs
and still getting the same error
ImportError: /home/hemang/anaconda3/lib/python3.8/site-packages/qlib/data/_libs/rolling.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZSt28__throw_bad_array_new_lengthv
https://hjlabs.in/
is your cython version wrong? mine is cython==3.0a1 . maybe install cython and then run install again.
finally, check your site-packages/qlib/data/_libs/
, it should include 6 file:
expanding.cpp ; rolling.cpp
rolling.cpython-38-x86_64-linux-gnu.so; expanding.cpython-38-x86_64-linux-gnu.so
rolling.pxy ; expanding.pxy
is your cython version wrong? mine is cython==3.0a1 . maybe install cython and then run install again. finally, check your
site-packages/qlib/data/_libs/
, it should include 6 file:expanding.cpp ; rolling.cpp rolling.cpython-38-x86_64-linux-gnu.so; expanding.cpython-38-x86_64-linux-gnu.so rolling.pxy ; expanding.pxy
1 - As you can see in this picture I have all the six files in the folder. 2 - And also my cython==3.0a1 https://hjlabs.in/
still getting the same error
ImportError: /home/hemang/anaconda3/lib/python3.8/site-packages/qlib/data/_libs/rolling.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZSt28__throw_bad_array_new_lengthv
https://hjlabs.in/
@hemangjoshi37a Can you reproduce this error in a new Conda environment? If you can reproduce it consistently, please give more info about your environment. https://github.com/microsoft/qlib/blob/main/scripts/collect_info.py maybe helpful to you.
@hemangjoshi37a Can you reproduce this error in a new Conda environment? If you can reproduce it consistently, please give more info about your environment. https://github.com/microsoft/qlib/blob/main/scripts/collect_info.py maybe helpful to you.
running : python3.8 collect_info.py all
It gives me this output
(base) hemang@hemang-HP-Pavilion-g6-Notebook-PC:~/Downloads/notebook_scripts$ python3.8 collect_info.py all
Linux
x86_64
Linux-5.15.0-27-generic-x86_64-with-glibc2.10
#28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022
Python version: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
Qlib version: 0.8.5.99
numpy==1.19.5
pandas==1.1.5
scipy==1.4.1
requests==2.26.0
sacred==0.8.2
python-socketio==5.4.0
redis==3.5.3
python-redis-lock==3.7.0
schedule==1.1.0
cvxpy==1.2.0
hyperopt==0.2.5
fire==0.4.0
statsmodels==0.12.2
xlrd==1.1.0
plotly==5.7.0
matplotlib==3.5.0
tables==3.6.1
pyyaml==6.0
mlflow==1.25.1
tqdm==4.62.3
loguru==0.5.3
lightgbm==3.3.2
tornado==6.1
joblib==1.1.0
fire==0.4.0
ruamel.yaml==0.16.12
This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days