waditu / tushare

TuShare is a utility for crawling historical data of China stocks
BSD 3-Clause "New" or "Revised" License
12.87k stars 4.29k forks source link

ImportError: cannot import name 'StringIO' from 'pandas.compat' #1277

Open newmann opened 4 years ago

newmann commented 4 years ago

python : 3.7.1 pandas : 1.0.0 tushare: 1.2.48

import tushare 报错: Traceback (most recent call last): File "", line 1, in File "c:\dev\Anaconda3\envs\tushare\lib\site-packages\tushare__init.py", line 11, in from tushare.stock.trading import (get_hist_data, get_tick_data, File "c:\dev\Anaconda3\envs\tushare\lib\site-packages\tushare\stock\trading.py", line 24, in from tushare.stock.fundamental import get_stock_basics File "c:\dev\Anaconda3\envs\tushare\lib\site-packages\tushare\stock\fundamental.py", line 19, in from pandas.compat import StringIO ImportError: cannot import name 'StringIO' from 'pandas.compat' (c:\dev\Anaconda3\envs\tushare\lib\site-packages\pandas\compat\init__.py)

wwdlook commented 4 years ago

I have the same problem, and my python version is py3.6

iseelearn commented 3 years ago

me too!

jerrychong25 commented 2 years ago

Same issues here.

@newmann @wwdlook @libsyc Do you all already have solution on this issue?

jerrychong25 commented 2 years ago

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