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

import tushare时报错 #1628

Open wuyunjiejie opened 2 years ago

wuyunjiejie commented 2 years ago

Traceback (most recent call last): File "<pyshell#0>", line 1, in import tushare as ts File "C:\Program Files\Python37\lib\site-packages\tushare__init__.py", line 82, in from tushare.pro.data_pro import (pro_api, pro_bar, subs, ht_subs) File "C:\Program Files\Python37\lib\site-packages\tushare\pro\data_pro.py", line 14, in from tushare.subs.ts_subs import Subs File "C:\Program Files\Python37\lib\site-packages\tushare\subs\ts_subs.py", line 20, in from websocket import WebSocketConnectionClosedException ImportError: cannot import name 'WebSocketConnectionClosedException' from 'websocket' (C:\Users\wuyunjie\AppData\Roaming\Python\Python37\site-packages\websocket__init__.py)

尝试过在cmd中pip install websocket以及pip install --upgrade websocket均无果。请问应该如何解决?谢谢

wuyunjiejie commented 2 years ago

我在jupyter notebook环境下使用的tushare