3 Answers
- Newest
- Most votes
- Most comments
0
Hi jorgr,
We do not add amazon-linux-extras as a module for Python 3. You can copy this module from
Python 2 to Python 3 by using the following command:
cp -r /lib/python2.7/site-packages/amazon_linux_extras /usr/local/lib/python3.7/site-packages
Best,
Zhen
answered 5 years ago
0
Correct command to copy the module would be:
cp -r /usr/lib/python2.7/site-packages/amazon_linux_extras /usr/local/python37/lib/python3.7/site-packages
answered 4 years ago
0
As noted in another reply, amazon-linux-extras is only available under python 2. Python 2 is officially sunsetted. Now that python defaults to python3 in Amazon Linux 2, this has broken amazon-linux-extras
and AWS should address the issue.
After inspecting the script amazon-linux-extras
, I saw that if the variable PYTHON is not defined, it uses python
by default. To work around, rather than copying any files, we can simply tell it to use python 2:
PYTHON=python2 amazon-linux-extras enable <package-name>
answered 4 years ago
Relevant content
- asked 2 years ago
- asked a year ago
- asked 4 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago