t4g.microインスタンスにBot環境を作る
ツールインストール
$ sudo amazon-linux-extras install epel -y
$ sudo yum install git emacs zsh nkf -y
Gitのパスワード一時的に保存
$ git config --global credential.helper cache
$ git config --global credential.helper 'cache --timeout=7200'
仮想環境作成
$ python3 -m venv myenv
$ . myenv/bin/activate
$ python -m pip install --upgrade pip
Pyenv環境作成
$ python3 -m pip install --upgrade pip
$ nano ~/.bashrc
code:.bashrc
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Restart your shell for the changes to take effect.
# Load pyenv-virtualenv automatically by adding
# the following to ~/.bashrc:
eval "$(pyenv virtualenv-init -)"
$ pyenv virtualenv system bitcoin
$ pyenv local bitcoin
$ pip install --upgrade pip
追加パッケージインストール
$ pip install aiohttp
$ pip install python-socketio
$ pip install python-socketio==4.3.1
$ pip install python-engineio==3.9.3
$ pip install websockets
$ pip install pandas
$ pip install numpy