QMT安装python第三方库
为了兼容性,需要本地使用python3.6.8版本,因为刚刚下载的QMT python版本就是3.6.8.
如果你本地有其他python版本的话,建议使用虚拟环境操作。这样不会影响你原有的python版本以及已经安装的第三方库。因为一机装多版本的python是很正常的操作。
这里建议使用安装anaconda来管理你的python版本。
如果你的电脑不是经常使用python的话,那就直接安装一个python3.6.8版本的即可。可以跳过下面这一步骤。
1. 创建一个python3.6.8虚拟环境: conda create --name qmt python=3.6.8
F:\QMT>conda create --name qmt python=3.6.8
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.12
latest version: 22.11.1
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: G:\Anaconda3\envs\qmt
added / updated specs:
- python=3.6.8
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-3.6.8 | h9f7ef89_7 20.3 MB
vc-14.2 | h21ff451_1 8 KB
wincertstore-0.2 | py36h7fe50ca_0 13 KB
wheel-0.37.1 | pyhd3eb1b0_0 31 KB
pip-21.2.2 | py36haa95532_0 2.1 MB
sqlite-3.40.1 | h2bbff1b_0 1.3 MB
certifi-2021.5.30 | py36haa95532_0 142 KB
vs2015_runtime-14.27.29016 | h5e58377_2 2.2 MB
setuptools-58.0.4 | py36haa95532_0 976 KB
------------------------------------------------------------
Total: 27.0 MB
The following NEW packages will be INSTALLED:
certifi: 2021.5.30-py36haa95532_0
pip: 21.2.2-py36haa95532_0
python: 3.6.8-h9f7ef89_7
setuptools: 58.0.4-py36haa95532_0
sqlite: 3.40.1-h2bbff1b_0
vc: 14.2-h21ff451_1
vs2015_runtime: 14.27.29016-h5e58377_2
wheel: 0.37.1-pyhd3eb1b0_0
wincertstore: 0.2-py36h7fe50ca_0
Proceed ([y]/n)? y
2. 激活虚拟环境: activate qmt
C:\Users\liuyukuan>activate qmt
(qmt) C:\Users\liuyukuan>
3.下载 tushare 第三方库到QMT
(qmt) C:\Users\liuyukuan>pip install tushare --target=F:\gszqqmt\bin.x64\Lib\site-packages
Collecting tushare
Downloading tushare-1.2.89-py3-none-any.whl (131 kB)
|████████████████████████████████| 131 kB 284 kB/s
Collecting bs4
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Collecting simplejson
Downloading simplejson-3.18.1-cp36-cp36m-win_amd64.whl (76 kB)
|████████████████████████████████| 76 kB 1.3 MB/s
Collecting websocket-client==0.57.0
Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)
|████████████████████████████████| 200 kB 1.3 MB/s
Collecting requests
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 635 kB/s
Collecting lxml
Downloading lxml-4.9.2-cp36-cp36m-win_amd64.whl (3.8 MB)
|████████████████████████████████| 3.8 MB 379 kB/s
Collecting pandas
Downloading pandas-1.1.5-cp36-cp36m-win_amd64.whl (8.7 MB)
|████████████████████████████████| 8.7 MB ...
Collecting six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting beautifulsoup4
Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
|████████████████████████████████| 128 kB ...
Collecting soupsieve>1.2
Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting numpy>=1.15.4
Downloading numpy-1.19.5-cp36-cp36m-win_amd64.whl (13.2 MB)
|████████████████████████████████| 13.2 MB ...
Collecting pytz>=2017.2
Downloading pytz-2022.7.1-py2.py3-none-any.whl (499 kB)
|████████████████████████████████| 499 kB 6.4 MB/s
Collecting python-dateutil>=2.7.3
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
|████████████████████████████████| 247 kB 6.4 MB/s
Collecting idna<4,>=2.5
Downloading idna-3.4-py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 42 kB/s
Collecting certifi>=2017.4.17
Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
|████████████████████████████████| 155 kB 6.4 MB/s
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
|████████████████████████████████| 140 kB ...
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Building wheels for collected packages: bs4
Building wheel for bs4 (setup.py) ... done
Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1272 sha256=2a98cbbc6acd8b8ccb0398efca4a5c404193c62347906c57ae89e2ae65cff88a
Stored in directory: