ubuntu安装zipline

直接在命令行敲入pip install zipline
中间会显示安装过程,最终

Successfully installed Cython-0.29.6 Logbook-1.4.3 Mako-1.0.8 alembic-1.0.8 bcolz-0.12.1 bottleneck-1.2.1 contextlib2-0.5.5 cyordereddict-1.0.0 empyrical-0.5.0 funcsigs-1.0.2 intervaltree-3.0.2 lru-dict-1.1.6 mock-2.0.0 multipledispatch-0.6.0 networkx-1.11 numexpr-2.6.9 pandas-0.22.0 pandas-datareader-0.7.0 patsy-0.5.1 pbr-5.1.3 python-editor-1.0.4 requests-file-1.4.3 scipy-1.2.1 sortedcontainers-2.1.0 sqlalchemy-1.3.1 statsmodels-0.9.0 tables-3.5.1 toolz-0.9.0 trading-calendars-1.7.0 wrapt-1.11.1 zipline-1.3.0

在使用quandl的时候需要先安装,提示python版本过低,新建一个conda虚拟python环境

conda create -n python37 python=3.7

最后安装zipline和quandl

pip install zipline
pip install quandl

在zipline中ingest数据

$ QUANDL_API_KEY=<yourkey> zipline ingest [-b <bundle>]

这里的api key要到quandl上注册去给,实测需要虚拟机连接vpn来下,否则速度不行,我用的是蓝灯的vpn,github上去下软件,装好deb,运行后在浏览器中就和windows上面的授权方法一样了,还算方便。

在2019年4月4日更新

(python35) han@han-virtual-machine:~/miniconda2/envs/python35/lib/python3.5/site-packages$ conda install -c Quantopian zipline
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.12
  latest version: 4.6.9

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/han/miniconda2/envs/python35

  added / updated specs: 
    - zipline


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    lxml-4.2.5                 |   py35hefd8a0e_0         1.6 MB
    intervaltree-2.1.0         |           py35_0          46 KB  Quantopian
    cffi-1.11.5                |   py35he75722e_1         213 KB
    cyordereddict-0.2.2        |           py35_0         160 KB  Quantopian
    numexpr-2.6.1              |      np114py35_0         414 KB  Quantopian
    statsmodels-0.9.0          |   py35h3010b51_0         8.8 MB
    requests-ftp-0.3.1         |           py35_0          12 KB
    alembic-0.7.7              |           py35_0         163 KB  Quantopian
    bzip2-1.0.6                |       h14c3975_5         414 KB
    click-6.7                  |   py35h353a69f_0         105 KB
    idna-2.7                   |           py35_0         133 KB
    libxml2-2.9.9              |       he19cac6_0         2.0 MB
    trading-calendars-1.6.1    |           py35_0         117 KB  Quantopian
    wrapt-1.10.11              |   py35h14c3975_2          45 KB
    snappy-1.1.7               |       hbae5bb6_3          38 KB
    cryptography-2.3.1         |   py35hc365091_0         585 KB
    libxslt-1.1.33             |       h7d1a2b0_0         577 KB
    multipledispatch-0.6.0     |           py35_0          21 KB
    decorator-4.4.0            |             py_0          13 KB
    asn1crypto-0.24.0          |           py35_0         156 KB
    python-dateutil-2.7.3      |           py35_0         261 KB
    sqlalchemy-1.2.11          |   py35h7b6447c_0         1.6 MB
    chardet-3.0.4              |           py35_1         191 KB
    mako-1.0.7                 |           py35_0         116 KB
    empyrical-0.5.0            |           py35_0          57 KB  Quantopian
    hdf5-1.10.2                |       hba1933b_1         5.2 MB
    pandas-0.22.0              |   py35hf484d3e_0        10.6 MB
    icu-58.2                   |       h9c2bf20_1        22.5 MB
    markupsafe-1.0             |   py35h14c3975_1          25 KB
    requests-file-1.4.3        |           py35_0           8 KB
    zipline-1.3.0              |      np114py35_0         5.2 MB  Quantopian
    pycparser-2.19             |           py35_0         175 KB
    pysocks-1.6.8              |           py35_0          22 KB
    logbook-0.12.5             |           py35_0         227 KB  Quantopian
    networkx-1.11              |           py35_1         1.5 MB
    lru-dict-1.1.4             |           py35_0          18 KB  Quantopian
    toolz-0.9.0                |           py35_0          92 KB
    pytz-2018.5                |           py35_0         231 KB
    scipy-1.1.0                |   py35hd20e5f9_0        18.0 MB
    lzo-2.10                   |       h49e0be7_2         313 KB
    pytables-3.4.4             |   py35ha205bf6_0         1.5 MB
    six-1.11.0                 |           py35_1          21 KB
    bcolz-0.12.1               |      np114py35_0         1.2 MB  Quantopian
    requests-2.20.1            |           py35_0          83 KB  Quantopian
    patsy-0.5.0                |           py35_0         322 KB
    pyopenssl-18.0.0           |           py35_0          82 KB
    blosc-1.15.0               |       hd408876_0         705 KB
    cython-0.28.5              |   py35hf484d3e_0         3.3 MB
    urllib3-1.23               |           py35_0         153 KB
    sortedcontainers-1.4.4     |           py35_0          62 KB  Quantopian
    contextlib2-0.5.5          |   py35h6690dba_0          15 KB
    bottleneck-1.2.1           |   py35h035aef0_1         128 KB
    pandas-datareader-0.6.0    |           py35_0         135 KB
    ------------------------------------------------------------
                                           Total:        89.6 MB

The following NEW packages will be INSTALLED:

    alembic:           0.7.7-py35_0           Quantopian
    asn1crypto:        0.24.0-py35_0                    
    bcolz:             0.12.1-np114py35_0     Quantopian
    blosc:             1.15.0-hd408876_0                
    bottleneck:        1.2.1-py35h035aef0_1             
    bzip2:             1.0.6-h14c3975_5                 
    cffi:              1.11.5-py35he75722e_1            
    chardet:           3.0.4-py35_1                     
    click:             6.7-py35h353a69f_0               
    contextlib2:       0.5.5-py35h6690dba_0             
    cryptography:      2.3.1-py35hc365091_0             
    cyordereddict:     0.2.2-py35_0           Quantopian
    cython:            0.28.5-py35hf484d3e_0            
    decorator:         4.4.0-py_0                       
    empyrical:         0.5.0-py35_0           Quantopian
    hdf5:              1.10.2-hba1933b_1                
    icu:               58.2-h9c2bf20_1                  
    idna:              2.7-py35_0                       
    intervaltree:      2.1.0-py35_0           Quantopian
    libxml2:           2.9.9-he19cac6_0                 
    libxslt:           1.1.33-h7d1a2b0_0                
    logbook:           0.12.5-py35_0          Quantopian
    lru-dict:          1.1.4-py35_0           Quantopian
    lxml:              4.2.5-py35hefd8a0e_0             
    lzo:               2.10-h49e0be7_2                  
    mako:              1.0.7-py35_0                     
    markupsafe:        1.0-py35h14c3975_1               
    multipledispatch:  0.6.0-py35_0                     
    networkx:          1.11-py35_1                      
    numexpr:           2.6.1-np114py35_0      Quantopian
    pandas:            0.22.0-py35hf484d3e_0            
    pandas-datareader: 0.6.0-py35_0                     
    patsy:             0.5.0-py35_0                     
    pycparser:         2.19-py35_0                      
    pyopenssl:         18.0.0-py35_0                    
    pysocks:           1.6.8-py35_0                     
    pytables:          3.4.4-py35ha205bf6_0             
    python-dateutil:   2.7.3-py35_0                     
    pytz:              2018.5-py35_0                    
    requests:          2.20.1-py35_0          Quantopian
    requests-file:     1.4.3-py35_0                     
    requests-ftp:      0.3.1-py35_0                     
    scipy:             1.1.0-py35hd20e5f9_0             
    six:               1.11.0-py35_1                    
    snappy:            1.1.7-hbae5bb6_3                 
    sortedcontainers:  1.4.4-py35_0           Quantopian
    sqlalchemy:        1.2.11-py35h7b6447c_0            
    statsmodels:       0.9.0-py35h3010b51_0             
    toolz:             0.9.0-py35_0                     
    trading-calendars: 1.6.1-py35_0           Quantopian
    urllib3:           1.23-py35_0                      
    wrapt:             1.10.11-py35h14c3975_2           
    zipline:           1.3.0-np114py35_0      Quantopian

Proceed ([y]/n)? y


Downloading and Extracting Packages
lxml-4.2.5           | 1.6 MB    | ##################################### | 100% 
intervaltree-2.1.0   | 46 KB     | ##################################### | 100% 
cffi-1.11.5          | 213 KB    | ##################################### | 100% 
cyordereddict-0.2.2  | 160 KB    | ##################################### | 100% 
numexpr-2.6.1        | 414 KB    | ##################################### | 100% 
statsmodels-0.9.0    | 8.8 MB    | ##################################### | 100% 
requests-ftp-0.3.1   | 12 KB     | ##################################### | 100% 
alembic-0.7.7        | 163 KB    | ##################################### | 100% 
bzip2-1.0.6          | 414 KB    | ##################################### | 100% 
click-6.7            | 105 KB    | ##################################### | 100% 
idna-2.7             | 133 KB    | ##################################### | 100% 
libxml2-2.9.9        | 2.0 MB    | ##################################### | 100% 
trading-calendars-1. | 117 KB    | ##################################### | 100% 
wrapt-1.10.11        | 45 KB     | ##################################### | 100% 
snappy-1.1.7         | 38 KB     | ##################################### | 100% 
cryptography-2.3.1   | 585 KB    | ##################################### | 100% 
libxslt-1.1.33       | 577 KB    | ##################################### | 100% 
multipledispatch-0.6 | 21 KB     | ##################################### | 100% 
decorator-4.4.0      | 13 KB     | ##################################### | 100% 
asn1crypto-0.24.0    | 156 KB    | ##################################### | 100% 
python-dateutil-2.7. | 261 KB    | ##################################### | 100% 
sqlalchemy-1.2.11    | 1.6 MB    | ##################################### | 100% 
chardet-3.0.4        | 191 KB    | ##################################### | 100% 
mako-1.0.7           | 116 KB    | ##################################### | 100% 
empyrical-0.5.0      | 57 KB     | ##################################### | 100% 
hdf5-1.10.2          | 5.2 MB    | ##################################### | 100% 
pandas-0.22.0        | 10.6 MB   | ##################################### | 100% 
icu-58.2             | 22.5 MB   | ##################################### | 100% 
markupsafe-1.0       | 25 KB     | ##################################### | 100% 
requests-file-1.4.3  | 8 KB      | ##################################### | 100% 
zipline-1.3.0        | 5.2 MB    | ##################################### | 100% 
pycparser-2.19       | 175 KB    | ##################################### | 100% 
pysocks-1.6.8        | 22 KB     | ##################################### | 100% 
logbook-0.12.5       | 227 KB    | ##################################### | 100% 
networkx-1.11        | 1.5 MB    | ##################################### | 100% 
lru-dict-1.1.4       | 18 KB     | ##################################### | 100% 
toolz-0.9.0          | 92 KB     | ##################################### | 100% 
pytz-2018.5          | 231 KB    | ##################################### | 100% 
scipy-1.1.0          | 18.0 MB   | ##################################### | 100% 
lzo-2.10             | 313 KB    | ##################################### | 100% 
pytables-3.4.4       | 1.5 MB    | ##################################### | 100% 
six-1.11.0           | 21 KB     | ##################################### | 100% 
bcolz-0.12.1         | 1.2 MB    | ##################################### | 100% 
requests-2.20.1      | 83 KB     | ##################################### | 100% 
patsy-0.5.0          | 322 KB    | ##################################### | 100% 
pyopenssl-18.0.0     | 82 KB     | ##################################### | 100% 
blosc-1.15.0         | 705 KB    | ##################################### | 100% 
cython-0.28.5        | 3.3 MB    | ##################################### | 100% 
urllib3-1.23         | 153 KB    | ##################################### | 100% 
sortedcontainers-1.4 | 62 KB     | ##################################### | 100% 
contextlib2-0.5.5    | 15 KB     | ##################################### | 100% 
bottleneck-1.2.1     | 128 KB    | ##################################### | 100% 
pandas-datareader-0. | 135 KB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值