Django ELasticBeanstalk ошибка Развернуть requirements.txt - EB
Так, я использовал SQlite, но перешел на MySQL, затем выполнил команду
pip install mysqlclient
и я подключился к базе данных, сделал
python manage.py makemigrations
и
python manage.py migratre
Я получил только это сообщение из журнала, но я думаю, что это не важно:
?: (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
потом я исключил свой файл requirements.txt, затем я сделал pip freeze > requirements.txt, сделал deploy и сделал
eb logs
чтобы получить ошибку ниже
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.