1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[備忘録]ローカル環境に計算ライブラリTA-Libをcondaで入れる

Last updated at Posted at 2019-04-23

#ダメでした
インストールはできるんだけど何故かjupyter lab上でmodule errorが出る。
そもそもAnacondaでは0.4.9までのサポート?(現在0.4.17)

結局pipでインストールした

pip install TA-Lib

#実行環境

  • OS:macOS mojave
  • conda 4.5.11

#インストール
(AnacondaとかのインストールはこちらのAnacondaの項を参照)

##これは失敗例(飛ばして)
仮想環境作る

conda create -n (環境名)

仮想環境起動

source activate (環境名)

インストール

conda install -c quantopian ta-lib

なんか怒られた

UnsatisfiableError: The following specifications were found to be in conflict:
  - python=3.6
  - ta-lib -> python=3.4 -> xz==5.0.5
Use "conda info <package>" to see the dependencies for each package.

pythonのバージョンがあってないらしい

##成功例:pythonバージョンを3.4に合わせる
バージョン指定で仮想環境作る

conda create -n (環境名) python=3.4

仮想環境起動

source activate (環境名)

インストール

conda install -c quantopian ta-lib

conda listで確認してみる

(環境名) PC名:~ User$ conda list
# packages in environment at /Users/Zi/anaconda3/envs/quantX:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl  
ca-certificates           2019.1.23                     0  
mkl                       11.3.3                        0  
numpy                     1.9.3                    py34_3  
openssl                   1.0.2r               h1de35cc_0  
pip                       9.0.1                    py34_1  
python                    3.4.5                         0  
readline                  6.2                           2  
setuptools                27.2.0                   py34_0  
sqlite                    3.13.0                        0  
ta-lib                    0.4.9                np19py34_0    quantopian
tk                        8.5.18                        0  
wheel                     0.29.0                   py34_0  
xz                        5.2.4                h1de35cc_4  
zlib                      1.2.11               h1de35cc_3  

入ってるぽい。

###終了
ついでにAnacondaのバージョンが古かったっぽいのでアプデしといた
仮想環境を出てbase環境に戻る

source deactivate

アプデ

conda update anaconda

Anaconda相変わらずくそなげえッ!!

The following packages will be UPDATED:

    alabaster:                          0.7.10-py36h174008c_0      --> 0.7.12-py36_0          
    anaconda:                           5.1.0-py36_2               --> 2019.03-py36_0         
    anaconda-project:                   0.8.2-py36h9ee5d53_0       --> 0.8.2-py36_0           
    appscript:                          1.0.1-py36h9e71e49_1       --> 1.1.0-py36h1de35cc_0   
    astroid:                            1.6.1-py36_0               --> 2.2.5-py36_0           
    astropy:                            2.0.3-py36h1de35cc_0       --> 3.1.2-py36h1de35cc_0   
    attrs:                              17.4.0-py36_0              --> 19.1.0-py36_1          
    babel:                              2.5.3-py36_0               --> 2.6.0-py36_0           
    backports:                          1.0-py36ha3c1827_1         --> 1.0-py36_1             
    backports.shutil_get_terminal_size: 1.0.0-py36hd7a2ee4_2       --> 1.0.0-py36_2           
    beautifulsoup4:                     4.6.0-py36h72d3c9f_1       --> 4.7.1-py36_1           
    bitarray:                           0.8.1-py36h1de35cc_1       --> 0.8.3-py36h1de35cc_0   
    bleach:                             2.1.2-py36_0               --> 3.1.0-py36_0           
    bokeh:                              0.12.13-py36h2f9c1c0_0     --> 1.0.4-py36_0           
    boto:                               2.48.0-py36hdbc59ac_1      --> 2.49.0-py36_0          
    bottleneck:                         1.2.1-py36hbd380ad_0       --> 1.2.1-py36h1d22016_1   
    bzip2:                              1.0.6-hd86a083_4           --> 1.0.6-h1de35cc_5       
    ca-certificates:                    2018.03.07-0               --> 2019.1.23-0            
    certifi:                            2018.11.29-py36_0          --> 2019.3.9-py36_0        
    cffi:                               1.11.4-py36h342bebf_0      --> 1.12.2-py36hb5b8e2f_1  
    chardet:                            3.0.4-py36h96c241c_1       --> 3.0.4-py36_1           
    click:                              6.7-py36hec950be_0         --> 7.0-py36_0             
    cloudpickle:                        0.5.2-py36_1               --> 0.8.0-py36_0           
    clyent:                             1.2.2-py36hae3ad88_0       --> 1.2.2-py36_1           
    colorama:                           0.3.9-py36hd29a30c_0       --> 0.4.1-py36_0           
    conda:                              4.5.11-py36_0              --> 4.6.14-py36_0          
    cryptography:                       2.1.4-py36h842514c_0       --> 2.6.1-py36ha12b0ac_0   
    curl:                               7.58.0-ha441bb4_0          --> 7.64.0-ha441bb4_2      
    cython:                             0.27.3-py36h6ecb376_0      --> 0.29.6-py36h0a44026_0  
    cytoolz:                            0.9.0-py36h1de35cc_0       --> 0.9.0.1-py36h1de35cc_1 
    dask:                               0.16.1-py36_0              --> 1.1.4-py36_1           
    dask-core:                          0.16.1-py36_0              --> 1.1.4-py36_1           
    dbus:                               1.13.2-h760590f_1          --> 1.13.6-h90a0687_0      
    decorator:                          4.2.1-py36_0               --> 4.4.0-py36_1           
    distributed:                        1.20.2-py36_0              --> 1.26.0-py36_1          
    entrypoints:                        0.2.3-py36hd81d71f_2       --> 0.3-py36_0             
    expat:                              2.2.5-hb8e80ba_0           --> 2.2.6-h0a44026_0       
    flask:                              0.12.2-py36h5658096_0      --> 1.0.2-py36_1           
    gevent:                             1.2.2-py36ha70b9d6_0       --> 1.4.0-py36h1de35cc_0   
    gmpy2:                              2.0.8-py36hf9c35bd_2       --> 2.0.8-py36h6ef4df4_2   
    greenlet:                           0.4.12-py36hf09ba7b_0      --> 0.4.15-py36h1de35cc_0  
    h5py:                               2.7.1-py36h39cdac5_0       --> 2.9.0-py36h3134771_0   
    hdf5:                               1.10.1-ha036c08_1          --> 1.10.4-hfa1e0ec_0      
    html5lib:                           1.0.1-py36h2f9c1c0_0       --> 1.0.1-py36_0           
    idna:                               2.6-py36h8628d0a_1         --> 2.8-py36_0             
    imageio:                            2.2.0-py36h5e01289_0       --> 2.5.0-py36_0           
    imagesize:                          0.7.1-py36h3495948_0       --> 1.1.0-py36_0           
    intel-openmp:                       2018.0.0-h8158457_8        --> 2019.3-199             
    ipykernel:                          4.8.0-py36_0               --> 5.1.0-py36h39e3cac_0   
    ipython:                            6.2.1-py36h3dda519_1       --> 7.4.0-py36h39e3cac_0   
    ipywidgets:                         7.1.1-py36_0               --> 7.4.2-py36_0           
    isort:                              4.2.15-py36hceb2a01_0      --> 4.3.16-py36_0          
    itsdangerous:                       0.24-py36h49fbb8d_1        --> 1.1.0-py36_0           
    jdcal:                              1.3-py36h1986823_0         --> 1.4-py36_0             
    jedi:                               0.11.1-py36_0              --> 0.13.3-py36_0          
    jinja2:                             2.10-py36hd36f9c5_0        --> 2.10-py36_0            
    jsonschema:                         2.6.0-py36hb385e00_0       --> 3.0.1-py36_0           
    jupyter:                            1.0.0-py36_4               --> 1.0.0-py36_7           
    jupyter_client:                     5.2.2-py36_0               --> 5.2.4-py36_0           
    jupyter_console:                    5.2.0-py36hccf5b1c_1       --> 6.0.0-py36_0           
    jupyter_core:                       4.4.0-py36h79cf704_0       --> 4.4.0-py36_0           
    jupyterlab:                         0.31.5-py36_0              --> 0.35.4-py36hf63ae98_0  
    lazy-object-proxy:                  1.3.1-py36h2fbbe47_0       --> 1.3.1-py36h1de35cc_2   
    libcurl:                            7.58.0-hf30b1f0_0          --> 7.64.0-h051b688_2      
    libcxx:                             4.0.1-h579ed51_0           --> 4.0.1-hcfea43d_1       
    libcxxabi:                          4.0.1-hebd6815_0           --> 4.0.1-hcfea43d_1       
    libedit:                            3.1-hb4e282d_0             --> 3.1.20181209-hb402a30_0
    libpng:                             1.6.34-he12f830_0          --> 1.6.36-ha441bb4_0      
    libsodium:                          1.0.15-hd9e47c5_0          --> 1.0.16-h3efe00b_0      
    libssh2:                            1.8.0-h322a93b_4           --> 1.8.0-ha12b0ac_4       
    libtiff:                            4.0.9-h0dac147_0           --> 4.0.10-hcb84e12_2      
    libxml2:                            2.9.7-hab757c2_0           --> 2.9.9-hab757c2_0       
    libxslt:                            1.1.32-hb819dd2_0          --> 1.1.33-h33a18ac_0      
    llvmlite:                           0.21.0-py36hff739e7_0      --> 0.28.0-py36h8c7ce04_0  
    lxml:                               4.1.1-py36hef8c89e_1       --> 4.3.2-py36hef8c89e_0   
    markupsafe:                         1.0-py36h3a1e703_1         --> 1.1.1-py36h1de35cc_0   
    matplotlib:                         3.0.0-py36h54f8f79_0       --> 3.0.3-py36h54f8f79_0   
    mccabe:                             0.6.1-py36hdaeb55d_0       --> 0.6.1-py36_1           
    mistune:                            0.8.3-py36_0               --> 0.8.4-py36h1de35cc_0   
    mkl:                                2018.0.1-hfbd8650_4        --> 2019.3-199             
    mkl-service:                        1.1.2-py36h7ea6df4_4       --> 1.1.2-py36hfbe908c_5   
    mpc:                                1.0.3-h7a72875_5           --> 1.1.0-h6ef4df4_1       
    mpfr:                               3.1.5-h711e7fd_2           --> 4.0.1-h3018a27_3       
    mpmath:                             1.0.0-py36hf1b8295_2       --> 1.1.0-py36_0           
    msgpack-python:                     0.5.1-py36h04f5b5a_0       --> 0.6.1-py36h04f5b5a_1   
    multipledispatch:                   0.4.9-py36hc5f92b5_0       --> 0.6.0-py36_0           
    nbconvert:                          5.3.1-py36h810822e_0       --> 5.4.1-py36_3           
    ncurses:                            6.0-hd04f020_2             --> 6.1-h0a44026_1         
    networkx:                           2.1-py36_0                 --> 2.2-py36_1             
    nltk:                               3.2.5-py36h1190bce_0       --> 3.4-py36_1             
    nose:                               1.3.7-py36h73fae2b_2       --> 1.3.7-py36_2           
    notebook:                           5.4.0-py36_0               --> 5.7.8-py36_0           
    numba:                              0.36.2-np114py36hc2f221f_0 --> 0.43.1-py36h6440ff4_0  
    numexpr:                            2.6.4-py36habcfcfe_0       --> 2.6.9-py36h7413580_0   
    numpy:                              1.14.2-py36ha9ae307_0      --> 1.16.2-py36hacdab7b_0  
    numpydoc:                           0.7.0-py36he54d08e_0       --> 0.8.0-py36_0           
    olefile:                            0.45.1-py36_0              --> 0.46-py36_0            
    openpyxl:                           2.4.10-py36_0              --> 2.6.1-py36_1           
    openssl:                            1.0.2p-h1de35cc_0          --> 1.1.1b-h1de35cc_1      
    packaging:                          16.8-py36he5e8135_0        --> 19.0-py36_0            
    pandas:                             0.22.0-py36h0a44026_0      --> 0.24.2-py36h0a44026_0  
    pandoc:                             1.19.2.1-ha5e8f32_1        --> 2.2.3.2-0              
    pandocfilters:                      1.4.2-py36h3b0b094_1       --> 1.4.2-py36_1           
    parso:                              0.1.1-py36hc90e01c_0       --> 0.3.4-py36_0           
    partd:                              0.3.8-py36hf5c4cb8_0       --> 0.3.10-py36_1          
    path.py:                            10.5-py36h7bcb313_0        --> 11.5.0-py36_0          
    pathlib2:                           2.3.0-py36h877a6d8_0       --> 2.3.3-py36_0           
    patsy:                              0.5.0-py36_0               --> 0.5.1-py36_0           
    pcre:                               8.42-h378b8a2_0            --> 8.43-h0a44026_0        
    pexpect:                            4.3.1-py36_0               --> 4.6.0-py36_0           
    pickleshare:                        0.7.4-py36hf512f8e_0       --> 0.7.5-py36_0           
    pillow:                             5.2.0-py36hb68e598_0       --> 5.4.1-py36hb68e598_0   
    pip:                                9.0.1-py36h1555ced_4       --> 19.0.3-py36_0          
    pluggy:                             0.6.0-py36hb1d0581_0       --> 0.9.0-py36_0           
    ply:                                3.10-py36h10e714e_0        --> 3.11-py36_0            
    prompt_toolkit:                     1.0.15-py36haeda067_0      --> 2.0.9-py36_0           
    psutil:                             5.4.3-py36h1de35cc_0       --> 5.6.1-py36h1de35cc_0   
    ptyprocess:                         0.5.2-py36he6521c3_0       --> 0.6.0-py36_0           
    py:                                 1.5.2-py36ha69170d_0       --> 1.8.0-py36_0           
    pycodestyle:                        2.3.1-py36h83e8646_0       --> 2.5.0-py36_0           
    pycosat:                            0.6.3-py36hee92d8f_0       --> 0.6.3-py36h1de35cc_0   
    pycparser:                          2.18-py36h724b2fc_1        --> 2.19-py36_0            
    pycrypto:                           2.6.1-py36h1de35cc_7       --> 2.6.1-py36h1de35cc_9   
    pycurl:                             7.43.0.1-py36hdbc3d79_0    --> 7.43.0.2-py36ha12b0ac_0
    pyflakes:                           1.6.0-py36hea45e83_0       --> 2.1.1-py36_0           
    pygments:                           2.2.0-py36h240cd3f_0       --> 2.3.1-py36_0           
    pylint:                             1.8.2-py36_0               --> 2.3.1-py36_0           
    pyodbc:                             4.0.22-py36h0a44026_0      --> 4.0.26-py36h0a44026_0  
    pyopenssl:                          17.5.0-py36h51e4350_0      --> 19.0.0-py36_0          
    pyparsing:                          2.2.0-py36hb281f35_0       --> 2.3.1-py36_0           
    pyqt:                               5.6.0-py36he5c6137_6       --> 5.9.2-py36h655552a_2   
    pysocks:                            1.6.7-py36hfa33cec_1       --> 1.6.8-py36_0           
    pytables:                           3.4.2-py36hfbd7ab0_2       --> 3.5.1-py36h5bccee9_0   
    pytest:                             3.3.2-py36_0               --> 4.3.1-py36_0           
    python:                             3.6.4-hc167b69_1           --> 3.6.8-haf84260_0       
    python-dateutil:                    2.6.1-py36h86d2abb_1       --> 2.8.0-py36_0           
    python.app:                         2-py36h54569d5_7           --> 2-py36_9               
    pytz:                               2017.3-py36hf0bf824_0      --> 2018.9-py36_0          
    pywavelets:                         0.5.2-py36h2710a04_0       --> 1.0.2-py36h1d22016_0   
    pyyaml:                             3.12-py36h2ba1e63_1        --> 5.1-py36h1de35cc_0     
    pyzmq:                              16.0.3-py36he48b5ad_0      --> 18.0.0-py36h0a44026_0  
    qt:                                 5.6.2-h9975529_14          --> 5.9.7-h468cd18_1       
    qtawesome:                          0.4.4-py36h468c6fb_0       --> 0.5.7-py36_1           
    qtconsole:                          4.3.1-py36hd96c0ff_0       --> 4.4.3-py36_0           
    qtpy:                               1.5.2-py36_0               --> 1.7.0-py36_1           
    readline:                           7.0-hc1231fa_4             --> 7.0-h1de35cc_5         
    requests:                           2.18.4-py36h4516966_1      --> 2.21.0-py36_0          
    rope:                               0.10.7-py36h68959ac_0      --> 0.12.0-py36_0          
    ruamel_yaml:                        0.15.35-py36h1de35cc_1     --> 0.15.46-py36h1de35cc_0 
    scikit-image:                       0.13.1-py36h1de35cc_1      --> 0.14.2-py36h0a44026_0  
    scikit-learn:                       0.19.1-py36hffbff8c_0      --> 0.20.3-py36h27c97d8_0  
    scipy:                              1.0.0-py36h1de22e9_0       --> 1.2.1-py36h1410ff5_0   
    seaborn:                            0.8.1-py36h595ecd9_0       --> 0.9.0-py36_0           
    send2trash:                         1.4.2-py36_0               --> 1.5.0-py36_0           
    setuptools:                         38.4.0-py36_0              --> 40.8.0-py36_0          
    sip:                                4.18.1-py36h2824476_2      --> 4.19.8-py36h0a44026_0  
    six:                                1.11.0-py36h0e22d5e_1      --> 1.12.0-py36_0          
    sortedcollections:                  0.5.3-py36he9c3ed6_0       --> 1.1.2-py36_0           
    sortedcontainers:                   1.5.9-py36_0               --> 2.1.0-py36_0           
    sphinx:                             1.6.6-py36_0               --> 1.8.5-py36_0           
    sphinxcontrib:                      1.0-py36h9364dc8_1         --> 1.0-py36_1             
    sphinxcontrib-websupport:           1.0.1-py36h92f4a7a_1       --> 1.1.0-py36_1           
    spyder:                             3.2.6-py36_0               --> 3.3.3-py36_0           
    sqlalchemy:                         1.2.1-py36h1de35cc_0       --> 1.3.1-py36h1de35cc_0   
    sqlite:                             3.22.0-h3efe00b_0          --> 3.27.2-ha441bb4_0      
    statsmodels:                        0.8.0-py36h9c68fc9_0       --> 0.9.0-py36h1d22016_0   
    sympy:                              1.1.1-py36h7f3cf04_0       --> 1.3-py36_0             
    testpath:                           0.3.1-py36h625a49b_0       --> 0.4.2-py36_0           
    tk:                                 8.6.7-h35a86e2_3           --> 8.6.8-ha441bb4_0       
    tornado:                            4.5.3-py36_0               --> 6.0.2-py36h1de35cc_0   
    unixodbc:                           2.3.4-h4cb4dde_1           --> 2.3.7-h1de35cc_0       
    urllib3:                            1.22-py36h68b9469_0        --> 1.24.1-py36_0          
    webencodings:                       0.5.1-py36h3b9701d_1       --> 0.5.1-py36_1           
    wheel:                              0.30.0-py36h5eb2c71_1      --> 0.33.1-py36_0          
    widgetsnbextension:                 3.1.0-py36_0               --> 3.4.2-py36_0           
    wrapt:                              1.10.11-py36hc29e774_0     --> 1.11.1-py36h1de35cc_0  
    xlrd:                               1.1.0-py36h336f4a2_1       --> 1.2.0-py36_0           
    xlsxwriter:                         1.0.2-py36h3736301_0       --> 1.1.5-py36_0           
    xlwings:                            0.11.5-py36_0              --> 0.15.4-py36_0          
    zeromq:                             4.2.2-ha360ad0_2           --> 4.3.1-h0a44026_3       
    zict:                               0.1.3-py36h71da714_0       --> 0.1.4-py36_0           
    zlib:                               1.2.11-hf3cbc9b_2          --> 1.2.11-h1de35cc_3 
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?