If pyenv is installed and the version of python is changed, it seems that amazon-linux-extras cannot be used as shown below. So I'll make it usable.
Current error
$ amazon-linux-extras
/home/ec2-user/.pyenv/versions/3.7.0/bin/python: No module named amazon_linux_extras
Click here for those who have python 3.7.0 in pyenv.
ln -s /lib/python2.7/site-packages/amazon_linux_extras ~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/
Click here for those who have python 3.7.5 in pyenv.
ln -s /lib/python2.7/site-packages/amazon_linux_extras ~/.pyenv/versions/3.7.5/lib/python3.7/site-packages/
For other versions, please refer to this and rewrite. Now you can use the code around "amazon-linux-extras". ✌️
Recommended Posts