I am trying to deploy my django project on Elastic Beanstalk. I am following the official document and this article and I think I have done most of the things asked in those resources correctly.
But my deployment is failing every time. On eb logs
I found this error
No matching distribution found for pkg-resources==0.0.0 (from -r /opt/python/ondeck/app/requirements.txt (line 27))
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2020-07-07 18:19:51,388 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
Traceback (most recent call last):
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
install_dependencies()
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
So far my problem seems very similar to this stackoverflow question but it is not. I removed the pkg-resources==0.0.0
from requirements.txt but it is still giving me the same error.
My requirements.txt
asgiref==3.2.10
attrs==19.3.0
awsebcli==3.18.1
bcrypt==3.1.7
blessed==1.17.8
botocore==1.15.49
cached-property==1.5.1
cement==2.8.2
certifi==2020.6.20
cffi==1.14.0
chardet==3.0.4
colorama==0.4.3
cryptography==2.9.2
Django==3.0.8
django-cors-headers==3.3.0
djangorestframework==3.11.0
djangorestframework-simplejwt==4.4.0
docker==4.2.2
docker-compose==1.25.5
dockerpty==0.4.1
docopt==0.6.2
docutils==0.15.2
future==0.16.0
idna==2.7
importlib-metadata==1.7.0
jmespath==0.10.0
jsonschema==3.2.0
paramiko==2.7.1
pathspec==0.5.9
psycopg2-binary==2.8.5
pycparser==2.20
PyJWT==1.7.1
PyNaCl==1.4.0
pyrsistent==0.16.0
python-dateutil==2.8.0
pytz==2020.1
PyYAML==5.3.1
requests==2.20.1
semantic-version==2.5.0
six==1.11.0
sqlparse==0.3.1
termcolor==1.1.0
texttable==1.6.2
urllib3==1.24.3
wcwidth==0.1.9
websocket-client==0.57.0
zipp==3.1.0
I have tried to launch new application and new environment for like 5 times now and nothing changed.