AWS Cloud9 に Python3 を導入
AWS Cloud9 の environment を作り
Preferences(歯車マーク)→ PROJECT SETTINGS → Python Support の
Python Version: Python 3 に変更
.bashrcのaliasをpython36に変更
1 | $ alias python=python36 |
以下のコマンドを投入
1 | $ sudo update-alternatives --config python |
2を選択
1 2 3 4 5 6 7 8 | There are 2 programs which provide 'python'. Selection Command ----------------------------------------------- *+ 1 /usr/bin/python2.7 2 /usr/bin/python3.6 Enter to keep the current selection[+], or type selection number: 2 |
バージョン確認
1 2 | $ python -V Python 3.6.2 |
1 2 | $ pip -V pip 9.0.1 from /usr/lib/python3.6/dist-packages (python 3.6) |
pip で必要なモジュールをインストール
コマンド例:
1 | $ sudo pip-3.6 install pybitflyer |
ta-lib のインストール
MACDの算出等は、ta-libを使うと便利だ。
インストール手順はこれ↓
1 2 3 4 5 6 7 8 9 10 11 12 | $ cd ~/ $ wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz $ tar xvzf ta-lib-0.4.0-src.tar.gz $ cd ta-lib $ ./configure --prefix=/usr $ make $ sudo make install $ sudo bash -c "echo "/usr/local/lib64" >> /etc/ld.so.conf" $ sudo /sbin/ldconfig $ sudo pip-3.6 install ta-lib |