Skip to content

Instantly share code, notes, and snippets.

@smd877
Created April 27, 2020 09:58
Show Gist options
  • Save smd877/2bd35392db22a9b6ea9de4f7dd147d8c to your computer and use it in GitHub Desktop.
Save smd877/2bd35392db22a9b6ea9de4f7dd147d8c to your computer and use it in GitHub Desktop.
Alexaスキル用のPython環境用意するためのスクリプト
#!/bin/sh
yum update -y
yum -y groupinstall "Development Tools"
yum -y install openssl-devel bzip2-devel readline-devel sqlite-devel libffi-devel
git clone https://github.com/yyuu/pyenv.git /opt/pyenv
echo 'export PYENV_ROOT="/opt/pyenv"' >> /root/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /root/.bash_profile
echo 'eval "$(pyenv init -)"' >> /root/.bash_profile
source /root/.bash_profile
pyenv install 3.8.2
pyenv global 3.8.2
mkdir /tmp/skill/
cd /tmp/skill/
pip install ask-sdk-core -t .
rm -rf certifi* chardet* idna* urllib3* dateutil/
touch lambda_function.py
zip ../skill.zip -r .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment