I'm trying to set up a django environment in Elastic Beanstalk. I am running into a python3.6 issue when I try to install through a requirements.txt file.
File "/opt/python/run/venv/bin/pip", line 4, in <module>
import re
File "/opt/python/run/venv/lib64/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
I cannot set up my environment properly while this is an issue. Some searching around pinpointed the enum34
module as the cause of the issue, but when I try to ssh into my EB environment and remove it using:
/opt/python/run/venv/bin/pip3 uninstall enum34
I get the same error, indicating the venv is broken in some way. How do I get around this issue? here are the extension files I pass into the environment for reference:
django.config:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: yahoo_serp/wsgi.py
aws:autoscaling:launchconfiguration:
InstanceType: t2.large
packages:
yum:
libjpeg-turbo-devel: []
db-migrate.config
container_commands:
01_migrate:
command: "./manage.py migrate"
leader_only: true
option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: yahoo_serp.settings