Got an error while bench init frappe-bench:
Debian Trixie. Clean install (in Gnome Boxes)
Installing frappe
$ uv pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
x Failed to build `mysqlclient==2.2.7`
|-> The build backend returned an error
`-> Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
Trying pkg-config --exists mysqlclient
Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.
Trying pkg-config --exists mariadb
# Options for building extension module:
extra_compile_args: ['-I/usr/include/mariadb/', '-std=c99']
extra_link_args: ['-L/usr/lib/x86_64-linux-gnu/', '-lmariadb']
define_macros: [('version_info', (2, 2, 7, 'final', 0)), ('__version__', '2.2.7')]
running bdist_wheel
running build
running build_py
copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-314/MySQLdb
copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-314/MySQLdb/constants
running egg_info
writing src/mysqlclient.egg-info/PKG-INFO
writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
writing top-level names to src/mysqlclient.egg-info/top_level.txt
reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-314/MySQLdb
running build_ext
building 'MySQLdb._mysql' extension
cc -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -O3 -fPIC -fPIC "-Dversion_info=(2, 2, 7, 'final', 0)" -D__version__=2.2.7
-I/home/frappe/.cache/uv/builds-v0/.tmpxgTHFD/include -I/home/frappe/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/include/python3.14 -c src/MySQLdb/_mysql.c -o
build/temp.linux-x86_64-cpython-314/src/MySQLdb/_mysql.o -I/usr/include/mariadb/ -std=c99
[stderr]
/home/frappe/.cache/uv/builds-v0/.tmpxgTHFD/lib/python3.14/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
/home/frappe/.cache/uv/builds-v0/.tmpxgTHFD/lib/python3.14/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
/home/frappe/.cache/uv/builds-v0/.tmpxgTHFD/lib/python3.14/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
error: command 'cc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build environment.
help: `mysqlclient` (v2.2.7) was included because `frappe` (v16.0.0.dev0) depends on `mysqlclient`
Error occured during app install: uv pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
led to the error:
sudo apt update && sudo apt upgrade -y
sudo apt install git redis-server libmariadb-dev mariadb-server mariadb-client pkg-config -y
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$mariadb_password';"
sudo mysql -u root -p"$mariadb_password" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$mariadb_password';"
sudo mysql -u root -p"$mariadb_password" -e "DELETE FROM mysql.user WHERE User='';"
sudo mysql -u root -p"$mariadb_password" -e "DROP DATABASE IF EXISTS test;DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';"
sudo mysql -u root -p"$mariadb_password" -e "FLUSH PRIVILEGES;"
sudo bash -c 'cat << EOF >> /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
EOF'
sudo systemctl restart mysql restart
sudo apt remove nodejs npm -y
sudo apt autoremove -y
sudo apt update
sudo apt upgrade -y
sudo apt install -y curl ca-certificates gnupg
sudo apt install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf-2.0-0 libffi-dev shared-mime-info
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env
uv python install 3.14 --default
source ~/.bashrc
uv tool install frappe-bench
bench init frappe-bench --frappe-branch version-16