tushare icon indicating copy to clipboard operation
tushare copied to clipboard

升级pandas到1.0.0出现的错误

Open mpkzo opened this issue 5 years ago • 2 comments

ID: 236559 升级pandas到1.0.0出现的 Traceback (most recent call last): File "D:\StockAnalize\tradeW.pyw", line 15, in import tushare as ts File "D:\Python\lib\site-packages\tushare_init_.py", line 11, in from tushare.stock.trading import (get_hist_data, get_tick_data, File "D:\Python\lib\site-packages\tushare\stock\trading.py", line 24, in from tushare.stock.fundamental import get_stock_basics File "D:\Python\lib\site-packages\tushare\stock\fundamental.py", line 19, in from pandas.compat import StringIO ImportError: cannot import name 'StringIO' from 'pandas.compat' (D:\Python\lib\site-packages\pandas\compat_init_.py)

mpkzo avatar Feb 06 '20 01:02 mpkzo

Have the same issue as well when import tushare as ts It was under Linux and I cloned the project then installed it by 'python3 setup.py install' Pending on a fix. Thanks

DamienGong avatar Mar 26 '20 04:03 DamienGong

Fixed this issue by upgrading to latest tushare latest version, with following commands: pip install tushare --upgrade

jerrychong25 avatar Nov 15 '21 12:11 jerrychong25