之前的系列是通过下载股票的历史数据的Excel,然后读写Excel写入mysql库,最终通过读取数据库的数据来完成股票分析,其中如果读取所有股票的耗时太长,还容易被网站短时间屏蔽,导致表格下载不了,后面又做了只读取制定股票的分析,重点关心一下自己盯上的股票~这个后续上传

后面了解到量化里有 tushare库,正好拿来继续研究~

 

总结:2022-03-11 

python3.9.1 + pip 20.0.2 + 清华镜像源 + pip安装lxml,pandas,bs4(不是pip3) ,最后 tushare库成功

 

概括:

1、更新pip到指定版本     python -m pip install --upgrade pip==20.0.2

2、pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

3、pip  install lxml       -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 

3、pip  install bs4       -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 

4、pip install tushare  -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

 

详细:

一、 pip install tushare 报错,正常第一反应是百度,果然说pip3 install tushare即可
C:\Users\Administrator>pip install tushare
Collecting tushare
Downloading tushare-1.2.84-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 118.7 kB/s eta 0:00:00
Requirement already satisfied: pandas in d:\programdata\anaconda3\lib\site-packages (from tushare) (0.23.4)
Requirement already satisfied: requests in d:\programdata\anaconda3\lib\site-packages (from tushare) (2.19.1)
Downloading tushare-1.2.83-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 18.5 kB/s eta 0:00:00
Downloading tushare-1.2.82-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 14.5 kB/s eta 0:00:00
Downloading tushare-1.2.81-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 7.6 kB/s eta 0:00:00
Downloading tushare-1.2.80-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 8.3 kB/s eta 0:00:00
Downloading tushare-1.2.79-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 15.3 kB/s eta 0:00:00
Downloading tushare-1.2.78-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 12.1 kB/s eta 0:00:00
Downloading tushare-1.2.77-py3-none-any.whl (130 kB)
---------------------------------- ----- 112.6/130.9 KB 10.9 kB/s eta 0:00:02
ERROR: Exception:
Traceback (most recent call last):
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 90, in read
data = self.__fp.read(amt)
File "d:\programdata\anaconda3\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "d:\programdata\anaconda3\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "d:\programdata\anaconda3\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "d:\programdata\anaconda3\lib\ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "d:\programdata\anaconda3\lib\ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
return func(self, options, args)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 340, in run
reqs, check_supported_wheels=not options.target_dir
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 373, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 211, in _attempt_to_pin_criterion
for candidate in criterion.candidates:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 220, in _make_candidate_from_link
version=version,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 294, in __init__
version=version,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 158, in __init__
self.dist = self._prepare()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 299, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 487, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 538, in _prepare_linked_requirement
hashes,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 218, in unpack_url
hashes=hashes,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 94, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\network\download.py", line 146, in __call__
for chunk in chunks:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 304, in _rich_progress_bar
for chunk in iterable:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\network\utils.py", line 87, in response_chunks
decode_content=False,
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "d:\programdata\anaconda3\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

 


二、然而pip3 install tushare 也报错,这时候就要仔细看报错信息了,和anaconda3 有关,这时想起来系统重装过,残留anaconda3,这时候就先卸载anaconda3,再用python编译器安装
C:\Users\Administrator>pip3 install tushare
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/tushare/
Collecting tushare
Using cached tushare-1.2.84-py3-none-any.whl (130 kB)
Requirement already satisfied: requests in d:\programdata\anaconda3\lib\site-packages (from tushare) (2.19.1)
Collecting websocket-client==0.57.0
Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)
---------------------------------------- 200.9/200.9 KB 47.5 kB/s eta 0:00:00
Collecting tushare
Using cached tushare-1.2.83-py3-none-any.whl (130 kB)
Using cached tushare-1.2.82-py3-none-any.whl (130 kB)
Using cached tushare-1.2.81-py3-none-any.whl (130 kB)
Collecting websocket-client>=0.57.0
Downloading websocket_client-1.3.1-py3-none-any.whl (54 kB)
---------------------------------------- 54.2/54.2 KB 51.2 kB/s eta 0:00:00
Collecting tushare
Using cached tushare-1.2.80-py3-none-any.whl (130 kB)
Using cached tushare-1.2.79-py3-none-any.whl (130 kB)
Using cached tushare-1.2.78-py3-none-any.whl (130 kB)
Downloading tushare-1.2.77-py3-none-any.whl (130 kB)
---------------------------------------- 130.9/130.9 KB 28.1 kB/s eta 0:00:00
Downloading tushare-1.2.76-py3-none-any.whl (130 kB)
---------------------------------------- 130.9/130.9 KB 6.7 kB/s eta 0:00:00
Downloading tushare-1.2.75-py3-none-any.whl (131 kB)
---------------------------------------- 131.3/131.3 KB 9.1 kB/s eta 0:00:00
Downloading tushare-1.2.73-py3-none-any.whl (130 kB)
---------------------------------------- 130.7/130.7 KB 6.7 kB/s eta 0:00:00
Downloading tushare-1.2.72-py3-none-any.whl (131 kB)
---------------------------------------- 131.2/131.2 KB 17.8 kB/s eta 0:00:00
Downloading tushare-1.2.71-py3-none-any.whl (131 kB)
---------------------------------------- 131.2/131.2 KB 13.0 kB/s eta 0:00:00
Downloading tushare-1.2.70-py3-none-any.whl (131 kB)
---------------------------------------- 131.2/131.2 KB 11.8 kB/s eta 0:00:00
Downloading tushare-1.2.69-py3-none-any.whl (130 kB)
---------------------------------------- 130.8/130.8 KB 13.1 kB/s eta 0:00:00
Downloading tushare-1.2.68-py3-none-any.whl (128 kB)
---------------------------------------- 128.8/128.8 KB 10.2 kB/s eta 0:00:00
Downloading tushare-1.2.67-py3-none-any.whl (129 kB)
---------------------------------------- 129.0/129.0 KB 9.7 kB/s eta 0:00:00
Downloading tushare-1.2.66-py3-none-any.whl (128 kB)
---------------------------------------- 129.0/129.0 KB 8.1 kB/s eta 0:00:00
Downloading tushare-1.2.64-py3-none-any.whl (214 kB)
---------------------------------------- 214.2/214.2 KB 8.0 kB/s eta 0:00:00
Requirement already satisfied: lxml>=3.8.0 in d:\programdata\anaconda3\lib\site-packages (from tushare) (4.2.5)
Collecting bs4>=0.0.1
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Preparing metadata (setup.py) ... done
Collecting tushare
Downloading tushare-1.2.63-py3-none-any.whl (214 kB)
----------- ---------------------------- 61.4/214.2 KB 6.5 kB/s eta 0:00:24
ERROR: Exception:
Traceback (most recent call last):
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 90, in read
data = self.__fp.read(amt)
File "d:\programdata\anaconda3\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "d:\programdata\anaconda3\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "d:\programdata\anaconda3\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "d:\programdata\anaconda3\lib\ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "d:\programdata\anaconda3\lib\ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
return func(self, options, args)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 340, in run
reqs, check_supported_wheels=not options.target_dir
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 373, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 211, in _attempt_to_pin_criterion
for candidate in criterion.candidates:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 220, in _make_candidate_from_link
version=version,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 294, in __init__
version=version,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 158, in __init__
self.dist = self._prepare()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 299, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 487, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 538, in _prepare_linked_requirement
hashes,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 218, in unpack_url
hashes=hashes,
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 94, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\network\download.py", line 146, in __call__
for chunk in chunks:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 304, in _rich_progress_bar
for chunk in iterable:
File "d:\programdata\anaconda3\lib\site-packages\pip\_internal\network\utils.py", line 87, in response_chunks
decode_content=False,
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "d:\programdata\anaconda3\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "d:\programdata\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

 

三、卸载anaconda3,然后要重启

 

 

四、重新安装python,版本是3.5.2

C:\Users\Administrator>pip3 install tushare
Collecting tushare
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130kB)
100% |████████████████████████████████| 133kB 88kB/s
Collecting bs4 (from tushare)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz
Collecting pandas (from tushare)
Downloading https://files.pythonhosted.org/packages/c4/eb/cfa96ba42695b3c28d4864a796d492f188471dd536df7e5e5e0c54b629a6/pandas-1.4.1.tar.gz (4.9MB)
30% |█████████▊ | 1.5MB 8.9kB/s eta 0:06:26

 

五、发现不需要像网上说的要手动安装一堆库,完全是自动实现的,但是下载速度太慢,因此换镜像源试试  pip3 install tushare -i https://pypi.tuna.tsinghua.edu.cn/simple

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

 

六、报错啦~

C:\Users\Administrator>pip3 install tushare -i https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tushare
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/tushare/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement tushare (from versions: )
No matching distribution found for tushare

 

7、更新一下试试  python -m pip install --upgrade pip

C:\Users\Administrator>python -m pip install --upgrade pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/pip/
Cache entry deserialization failed, entry ignored
Collecting pip
Downloading https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl (2.1MB)
88% |████████████████████████████▍ | 1.9MB 9.2kB/s eta 0:0

最终更新完再用清华源安装报另外错:

C:\Users\Administrator>pip3 install tushare -i https://pypi.tuna.tsinghua.edu.cn/simple
Traceback (most recent call last):
File "d:\program files\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "d:\program files\python\python35-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Program Files\Python\Python35-32\Scripts\pip3.exe\__main__.py", line 5, in <module>
File "d:\program files\python\python35-32\lib\site-packages\pip\_internal\cli\main.py", line 57
sys.stderr.write(f"ERROR: {exc}")

 

8、回到第六步的出错,再次百度一下,加入信任域

pip install 插件名 -i 国内镜像地址 http://pypi.douban.com/simple --trusted-host pypi.douban.com

 

C:\Users\Administrator>pip3 install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Traceback (most recent call last):
File "d:\program files\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "d:\program files\python\python35-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Program Files\Python\Python35-32\Scripts\pip3.exe\__main__.py", line 5, in <module>
File "d:\program files\python\python35-32\lib\site-packages\pip\_internal\cli\main.py", line 57
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax

好的吧,和第七步一模一样、、、、、、

 

9、再试一试,发现升级后的pip就不能用了,哎

:\Users\Administrator>pip --help
Traceback (most recent call last):
File "d:\program files\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "d:\program files\python\python35-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Program Files\Python\Python35-32\Scripts\pip.exe\__main__.py", line 5, in <module>
File "d:\program files\python\python35-32\lib\site-packages\pip\_internal\cli\main.py", line 57
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax

 

10、得了,重新安装一下python吧,再试下信任境内源的安装tushare

C:\Users\Administrator>pip3 install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Collecting tushare
Downloading http://pypi.doubanio.com/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130kB)
100% |████████████████████████████████| 133kB 3.3MB/s
Collecting websocket-client==0.57.0 (from tushare)
Downloading http://pypi.doubanio.com/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200kB)
100% |████████████████████████████████| 204kB 6.6MB/s
Collecting lxml (from tushare)
Downloading http://pypi.doubanio.com/packages/25/3b/30d8f8738161f7a2f105e9369df8030f473fcc1b50b890c5281849f67447/lxml-4.8.0-cp35-cp35m-win32.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 6.6MB/s
Collecting simplejson (from tushare)
Could not find a version that satisfies the requirement simplejson (from tushare) (from versions: )
No matching distribution found for simplejson (from tushare)
You are using pip version 8.1.1, however version 22.0.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\Administrator>

还是报错

 

11、安装其他库试一下:

C:\Users\Administrator>pip3 install pymysql -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Collecting pymysql
Downloading http://pypi.doubanio.com/packages/4f/52/a115fe175028b058df353c5a3d5290b71514a83f67078a6482cff24d6137/PyMySQL-1.0.2-py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 3.3MB/s
Installing collected packages: pymysql
Successfully installed pymysql-1.0.2
You are using pip version 8.1.1, however version 22.0.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\Administrator>pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Collecting pandas
Downloading http://pypi.doubanio.com/packages/c4/eb/cfa96ba42695b3c28d4864a796d492f188471dd536df7e5e5e0c54b629a6/pandas-1.4.1.tar.gz (4.9MB)
100% |████████████████████████████████| 4.9MB 3.3MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Administrator\AppData\Local\Temp\pip-build-2ko9nht6\pandas\setup.py", line 250
f"{extension}-source file '{sourcefile}' not found.\n"
^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-build-2ko9nht6\pandas\
You are using pip version 8.1.1, however version 22.0.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

pymysql库直接成功了,pandans 库不行,感觉还是要升级pip,但是介于之前直接升级最新版本有很多问题,所以只升级稍微高一点版本吧

 

12、pip升级到制定版本

python -m pip install --upgrade pip==20.0.2

C:\Users\Administrator>python -m pip install --upgrade pip==20.0.2
Collecting pip==20.0.2
Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 819kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-20.0.2

C:\Users\Administrator>pip list
pip (8.1.1)
PyMySQL (1.0.2)
setuptools (20.10.1)
You are using pip version 8.1.1, however version 22.0.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

 

 

13、pandas库可以了,pymysql库好像不行

C:\Users\Administrator>pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting pandas
Downloading http://pypi.doubanio.com/packages/f2/7a/f2ed4fde495eb8d13dc595382c33f8aa2b58e0911ca4b12c1ca825872493/pandas-0.24.2-cp35-cp35m-win32.whl (7.3 MB)
|████████████████████████████████| 7.3 MB 1.1 MB/s
Collecting python-dateutil>=2.5.0
Downloading http://pypi.doubanio.com/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
|████████████████████████████████| 247 kB 1.6 MB/s
Collecting numpy>=1.12.0
Downloading http://pypi.doubanio.com/packages/46/04/4ceccf9b04f89f32bfc2976ebf6c35488c1d6a4b5d375dc4d3137c967386/numpy-1.18.5-cp35-cp35m-win32.whl (10.7 MB)
|████████████████████████████████| 10.7 MB 2.2 MB/s
Collecting pytz>=2011k
Downloading http://pypi.doubanio.com/packages/d3/e3/d9f046b5d1c94a3aeab15f1f867aa414f8ee9d196fae6865f1d6a0ee1a0b/pytz-2021.3-py2.py3-none-any.whl (503 kB)
|████████████████████████████████| 503 kB 2.2 MB/s
Collecting six>=1.5
Downloading http://pypi.doubanio.com/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, python-dateutil, numpy, pytz, pandas
Successfully installed numpy-1.18.5 pandas-0.24.2 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0
WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
You should consider upgrading via the 'd:\program files\python\python35-32\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>pip3 install pymysql -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Requirement already satisfied: pymysql in d:\program files\python\python35-32\lib\site-packages (1.0.2)
ERROR: Package 'PyMySQL' requires a different Python: 3.5.2 not in '>=3.6'
WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available.
You should consider upgrading via the 'd:\program files\python\python35-32\python.exe -m pip install --upgrade pip' command.

 

 

14、发现python版本太老了,还是用3.7经典版本吧,哎,好事多磨啊

Linux版本下载:  https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz

https://blog.csdn.net/weixin_37988176/article/details/109420490

 

Windows版本下载: https://www.python.org/downloads/windows/

 

15、实测到最后:

3.9.1版本 加 pip20.0.2都可以安装了

C:\Users\Administrator>python
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

C:\Users\Administrator>pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting pandas
Downloading http://pypi.doubanio.com/packages/3b/81/73396f8b40cb02887116af3b45f34c6a3a434682a1026686ad48d51900eb/pandas-1.4.1-cp39-cp39-win_amd64.whl (10.5 MB)
|████████████████████████████████| 10.5 MB 819 kB/s
Collecting numpy>=1.18.5; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10"
Downloading http://pypi.doubanio.com/packages/d8/0c/429d18873843ac368fae6647fca04bf76cc4683560338c76260d8964a00d/numpy-1.22.3-cp39-cp39-win_amd64.whl (14.7 MB)
|████████████████████████████████| 14.7 MB 939 kB/s
Collecting pytz>=2020.1
Downloading http://pypi.doubanio.com/packages/d3/e3/d9f046b5d1c94a3aeab15f1f867aa414f8ee9d196fae6865f1d6a0ee1a0b/pytz-2021.3-py2.py3-none-any.whl (503 kB)
|████████████████████████████████| 503 kB 1.3 MB/s
ERROR: Could not find a version that satisfies the requirement python-dateutil>=2.8.1 (from pandas) (from versions: none)
ERROR: No matching distribution found for python-dateutil>=2.8.1 (from pandas)
WARNING: You are using pip version 20.2.3; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>python -m pip install --upgrade pip==20.0.2
Collecting pip==20.0.2
Using cached pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.3
Uninstalling pip-20.2.3:
Successfully uninstalled pip-20.2.3
Successfully installed pip-20.0.2

C:\Users\Administrator>pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting pandas
Downloading http://pypi.doubanio.com/packages/3b/81/73396f8b40cb02887116af3b45f34c6a3a434682a1026686ad48d51900eb/pandas-1.4.1-cp39-cp39-win_amd64.whl (10.5 MB)
|████████████████████████████████| 10.5 MB 3.3 MB/s
Collecting python-dateutil>=2.8.1
Downloading http://pypi.doubanio.com/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
|████████████████████████████████| 247 kB 1.3 MB/s
Collecting pytz>=2020.1
Downloading http://pypi.doubanio.com/packages/d3/e3/d9f046b5d1c94a3aeab15f1f867aa414f8ee9d196fae6865f1d6a0ee1a0b/pytz-2021.3-py2.py3-none-any.whl (503 kB)
|████████████████████████████████| 503 kB 1.7 MB/s
Collecting numpy>=1.18.5; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10"
Downloading http://pypi.doubanio.com/packages/d8/0c/429d18873843ac368fae6647fca04bf76cc4683560338c76260d8964a00d/numpy-1.22.3-cp39-cp39-win_amd64.whl (14.7 MB)
|████████████████████████████████| 14.7 MB 1.6 MB/s
Collecting six>=1.5
Downloading http://pypi.doubanio.com/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
Successfully installed numpy-1.22.3 pandas-1.4.1 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Requirement already satisfied: pandas in d:\program files\python\python39\lib\site-packages (1.4.1)
Requirement already satisfied: python-dateutil>=2.8.1 in d:\program files\python\python39\lib\site-packages (from pandas) (2.8.2)
Requirement already satisfied: numpy>=1.18.5; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10" in d:\program files\python\python39\lib\site-packages (from pandas) (1.22.3)
Requirement already satisfied: pytz>=2020.1 in d:\program files\python\python39\lib\site-packages (from pandas) (2021.3)
Requirement already satisfied: six>=1.5 in d:\program files\python\python39\lib\site-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>pip3 install pymysql -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting pymysql
Downloading http://pypi.doubanio.com/packages/4f/52/a115fe175028b058df353c5a3d5290b71514a83f67078a6482cff24d6137/PyMySQL-1.0.2-py3-none-any.whl (43 kB)
|████████████████████████████████| 43 kB ...
Installing collected packages: pymysql
Successfully installed pymysql-1.0.2
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>

 

16、裸安装的python,必须是部分目录才能执行python命令,先到C:\Users\Administrator对付过去了,明天继续,至少保证自己原先的脚本能用

F:\LearnFile\language\python\project\gupiao\traceSpecialStocks>python stockAnaSys.py
'python' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

F:\LearnFile\language\python\project\gupiao\traceSpecialStocks>python
'python' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

F:\LearnFile\language\python\project\gupiao\traceSpecialStocks>

C:\Users\Administrator>python
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

C:\Users\Administrator>F:\LearnFile\language\python\project\gupiao\traceSpecialStocks\stockAnaSys.py

C:\Users\Administrator>python F:\LearnFile\language\python\project\gupiao\traceSpecialStocks\stockAnaSys.py
下载excels
正在获取股票603169数据
正在获取股票601700数据
正在获取股票600740数据
正在获取股票601988数据
正在获取股票600775数据
正在获取股票601000数据
正在获取股票600681数据
正在获取股票601006数据
正在获取股票601328数据
正在获取股票600533数据
正在获取股票600280数据
正在获取股票600507数据
正在获取股票600028数据
正在获取股票601118数据
存储信息到数据库
正在存储stock_600028
正在存储stock_600280
正在存储stock_600507
正在存储stock_600533
正在存储stock_600681
正在存储stock_600740
正在存储stock_600775
正在存储stock_601000
正在存储stock_601006
正在存储stock_601118
正在存储stock_601328
正在存储stock_601700
正在存储stock_601988
正在存储stock_603169
分析股票数据
use exist file
over

 

17、继续安装 tushare,各种问题

oft Windows [版本 10.0.17763.1339]
(c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>pip3 install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com    --缺少证书
Looking in indexes: http://pypi.douban.com/simple
Collecting tushare
Downloading http://pypi.doubanio.com/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 930 kB/s
Requirement already satisfied: pandas in d:\program files\python\python39\lib\site-packages (from tushare) (1.4.1)
Collecting lxml
Downloading http://pypi.doubanio.com/packages/77/58/a056a0876c5befaf9a9fdfb3ef67d7500cf85012b87c7358a4c130c97170/lxml-4.8.0-cp39-cp39-win_amd64.whl (3.6 MB)
|████████████████████████████████| 3.6 MB 93 kB/s
Collecting requests
Downloading http://pypi.doubanio.com/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 4.8 MB/s
Collecting websocket-client==0.57.0
Downloading http://pypi.doubanio.com/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)
|████████████████████████████████| 200 kB 939 kB/s
Collecting bs4
Downloading http://pypi.doubanio.com/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz (1.1 kB)
Collecting simplejson
Downloading http://pypi.doubanio.com/packages/99/c1/b0a72b566466b67b15a26561269e65f6a730cbd6c33f9f06f2a0c66dbeb4/simplejson-3.17.6-cp39-cp39-win_amd64.whl (75 kB)
|████████████████████████████████| 75 kB 1.1 MB/s
Requirement already satisfied: pytz>=2020.1 in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (2021.3)
Requirement already satisfied: python-dateutil>=2.8.1 in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (2.8.2)
Requirement already satisfied: numpy>=1.18.5; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10" in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (1.22.3)
Collecting urllib3<1.27,>=1.21.1
Downloading http://pypi.doubanio.com/packages/4e/b8/f5a25b22e803f0578e668daa33ba3701bb37858ec80e08a150bd7d2cf1b1/urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
|████████████████████████████████| 138 kB 6.4 MB/s
ERROR: Could not find a version that satisfies the requirement certifi>=2017.4.17 (from requests->tushare) (from versions: none)
ERROR: No matching distribution found for certifi>=2017.4.17 (from requests->tushare)
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

 

C:\Users\Administrator>pip install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com      --换pip安装,缺少 lxml 库
Looking in indexes: http://pypi.douban.com/simple
Collecting tushare
Downloading http://pypi.doubanio.com/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 3.3 MB/s
Requirement already satisfied: pandas in d:\program files\python\python39\lib\site-packages (from tushare) (1.4.1)
Collecting bs4
Downloading http://pypi.doubanio.com/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz (1.1 kB)
Collecting requests
Downloading http://pypi.doubanio.com/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 4.5 MB/s
ERROR: Could not find a version that satisfies the requirement lxml (from tushare) (from versions: none)
ERROR: No matching distribution found for lxml (from tushare)
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

C:\Users\Administrator>pip install lxml -i http://pypi.douban.com/simple --trusted-host pypi.douban.com   --安装 lxml 库
Looking in indexes: http://pypi.douban.com/simple
Collecting lxml
Downloading http://pypi.doubanio.com/packages/77/58/a056a0876c5befaf9a9fdfb3ef67d7500cf85012b87c7358a4c130c97170/lxml-4.8.0-cp39-cp39-win_amd64.whl (3.6 MB)
|████████████████████████████████| 3.6 MB 3.3 MB/s
Installing collected packages: lxml
Successfully installed lxml-4.8.0
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

 

C:\Users\Administrator>pip install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com       --又缺少 beautifulsoup4库
Looking in indexes: http://pypi.douban.com/simple
Collecting tushare
Downloading http://pypi.doubanio.com/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 3.3 MB/s
Collecting simplejson
Downloading http://pypi.doubanio.com/packages/99/c1/b0a72b566466b67b15a26561269e65f6a730cbd6c33f9f06f2a0c66dbeb4/simplejson-3.17.6-cp39-cp39-win_amd64.whl (75 kB)
|████████████████████████████████| 75 kB 1.7 MB/s
Collecting requests
Downloading http://pypi.doubanio.com/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 4.5 MB/s
Requirement already satisfied: pandas in d:\program files\python\python39\lib\site-packages (from tushare) (1.4.1)
ERROR: Could not find a version that satisfies the requirement bs4 (from tushare) (from versions: none)
ERROR: No matching distribution found for bs4 (from tushare)
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

 

C:\Users\Administrator>pip install bs4 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com        --安装 beautifulsoup4库
Looking in indexes: http://pypi.douban.com/simple
Collecting bs4
Downloading http://pypi.doubanio.com/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz (1.1 kB)
Collecting beautifulsoup4
Downloading http://pypi.doubanio.com/packages/69/bf/f0f194d3379d3f3347478bd267f754fc68c11cbf2fe302a6ab69447b1417/beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 2.2 MB/s
Collecting soupsieve>1.2
Downloading http://pypi.doubanio.com/packages/72/a6/fd01694427f1c3fcadfdc5f1de901b813b9ac756f0806ef470cfed1de281/soupsieve-2.3.1-py3-none-any.whl (37 kB)
Installing collected packages: soupsieve, beautifulsoup4, bs4
Running setup.py install for bs4 ... done
Successfully installed beautifulsoup4-4.10.0 bs4-0.0.1 soupsieve-2.3.1
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

 

C:\Users\Administrator>pip install tushare -i http://pypi.douban.com/simple --trusted-host pypi.douban.com            --最后还是找不到tushare版本
Looking in indexes: http://pypi.douban.com/simple
ERROR: Could not find a version that satisfies the requirement tushare (from versions: none)
ERROR: No matching distribution found for tushare
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

 

 

C:\Users\Administrator>pip install tushare -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn     --又去清华镜像源安装了一下,终于ok了
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tushare
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5d/51/86438dc2f87c129a07536b58b988e8af7572913477df39ad7abb75e8aa02/tushare-1.2.84-py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 1.7 MB/s
Requirement already satisfied: pandas in d:\program files\python\python39\lib\site-packages (from tushare) (1.4.1)
Requirement already satisfied: bs4 in d:\program files\python\python39\lib\site-packages (from tushare) (0.0.1)
Collecting simplejson
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/99/c1/b0a72b566466b67b15a26561269e65f6a730cbd6c33f9f06f2a0c66dbeb4/simplejson-3.17.6-cp39-cp39-win_amd64.whl (75 kB)
|████████████████████████████████| 75 kB ...
Collecting requests
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB ...
Collecting websocket-client==0.57.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)
|████████████████████████████████| 200 kB 3.2 MB/s
Requirement already satisfied: lxml in d:\program files\python\python39\lib\site-packages (from tushare) (4.8.0)
Requirement already satisfied: pytz>=2020.1 in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (2021.3)
Requirement already satisfied: python-dateutil>=2.8.1 in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (2.8.2)
Requirement already satisfied: numpy>=1.18.5; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10" in d:\program files\python\python39\lib\site-packages (from pandas->tushare) (1.22.3)
Requirement already satisfied: beautifulsoup4 in d:\program files\python\python39\lib\site-packages (from bs4->tushare) (4.10.0)
Collecting certifi>=2017.4.17
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
|████████████████████████████████| 149 kB 3.3 MB/s
Collecting charset-normalizer~=2.0.0; python_version >= "3"
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/b8/f5a25b22e803f0578e668daa33ba3701bb37858ec80e08a150bd7d2cf1b1/urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
|████████████████████████████████| 138 kB ...
Collecting idna<4,>=2.5; python_version >= "3"
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 3.8 MB/s
Requirement already satisfied: six in d:\program files\python\python39\lib\site-packages (from websocket-client==0.57.0->tushare) (1.16.0)
Requirement already satisfied: soupsieve>1.2 in d:\program files\python\python39\lib\site-packages (from beautifulsoup4->bs4->tushare) (2.3.1)
Installing collected packages: simplejson, certifi, charset-normalizer, urllib3, idna, requests, websocket-client, tushare
Successfully installed certifi-2021.10.8 charset-normalizer-2.0.12 idna-3.3 requests-2.27.1 simplejson-3.17.6 tushare-1.2.84 urllib3-1.26.8 websocket-client-0.57.0
WARNING: You are using pip version 20.0.2; however, version 22.0.4 is available.
You should consider upgrading via the 'd:\program files\python\python39\python.exe -m pip install --upgrade pip' command.

C:\Users\Administrator>

>>> ts.__version__
'1.2.84'