Django ELasticBeanstalk error Deploy requirements.txt - EB
So, I was using SQlite but, i switched to MySQL, then i did the command
pip install mysqlclient
and i connected to the database, did
python manage.py makemigrations
and
python manage.py migratre
I only got this message from the log but I guess it's not important:
?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default'
HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL,
such as data truncation upon insertion, by escalating warnings into errors. It
is strongly recommended you activate it. See: https://docs.djangoproject.com/en/4.0/ref/databases/#mysql-sql-mode
then i excluded my requirements.txt then i did pip freeze > requirements.txt, did the deploy and did
eb logs
to get the error below
Collecting mysqlclient==2.1.0
Using cached mysqlclient-2.1.0.tar.gz (87 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
2022/04/25 05:42:23.880429 [INFO] error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
\u2570─> [16 lines of output]
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-52csz_by/mysqlclient_d55944e3cacc47d8998c991cac209734/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-52csz_by/mysqlclient_d55944e3cacc47d8998c991cac209734/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-52csz_by/mysqlclient_d55944e3cacc47d8998c991cac209734/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
\u2570─> See above for output.