Bench new site create error

Hello everyone, when i try to create a new site while installation i get this error.

Last login: Thu May 16 19:45:37 2024 from 192.168.**.*
rahul@rahul:~$ bench new-site
WARN: Command not being executed in bench directory
Usage: bench [OPTIONS] COMMAND [ARGS]…
Try ‘bench --help’ for help.

Error: No such command ‘new-site’.

Thank you

i tried to stop the bench start command and then run the bench new site but got this error-
darkbot@rahul:~/frappe-bench$ bench new-site
MySQL root password:
Traceback (most recent call last):
File “/usr/lib/python3.10/”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/”, line 86, in _run_code
exec(code, run_globals)
File “/home/darkbot/frappe-bench/apps/frappe/frappe/utils/”, line 109, in
File “/home/darkbot/frappe-bench/apps/frappe/frappe/utils/”, line 18, in main
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 829, in call
return self.main(*args, **kwargs)
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 782, in main
rv = self.invoke(ctx)
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/click/”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/darkbot/frappe-bench/apps/frappe/frappe/commands/”, line 70, in new_site
File “/home/darkbot/frappe-bench/apps/frappe/frappe/”, line 80, in _new_site
File “/home/darkbot/frappe-bench/apps/frappe/frappe/”, line 154, in install_db
setup_database(force, source_sql, verbose, no_mariadb_socket)
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/”, line 20, in setup_database
return frappe.database.mariadb.setup_db.setup_database(
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/mariadb/”, line 36, in setup_database
if force or (db_name not in dbman.get_database_list()):
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/”, line 49, in get_database_list
return self.db.sql(“SHOW DATABASES”, pluck=True)
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/”, line 221, in sql
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/”, line 126, in connect
self._conn: “MariadbConnection” | “PostgresConnection” = self.get_connection()
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/mariadb/”, line 103, in get_connection
conn = self._get_connection()
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/mariadb/”, line 109, in _get_connection
return self.create_connection()
File “/home/darkbot/frappe-bench/apps/frappe/frappe/database/mariadb/”, line 112, in create_connection
return pymysql.connect(**self.get_connection_settings())
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 352, in init
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 636, in connect
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 911, in _request_authentication
auth_packet = self._read_packet()
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 729, in _read_packet
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 221, in raise_for_error
File “/home/darkbot/frappe-bench/env/lib/python3.10/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1698, “Access denied for user ‘root’@‘localhost’”)

Hi @rs115199789 Also, you use Ubuntu 24.04 LTS version ? if yes, you have to install the frappe inside the virtual bench, as pip install is not working anymore in installations, so you can use this guide as It worked for me ,
if you are using Ubuntu 22.04 LTS you can use this guide : frappe in Ubuntu 22.04 LTS

Uninstall frappe bench install it with
sudo -H pip3 install frappe-bench

You are inputing the wrong password for the root database user. You need to change the password or inform the correct one.

@Faris_Alsolmi @gcunha

I installed ubuntu 24 again and tried the latest steps, but when i try to install VIRTUAL ENV 3.11

i get this error-

darklord@darklord:~$ sudo apt install python3.11-venv
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package python3.11-venv
E: Couldn’t find any package by glob ‘python3.11-venv’

Also my passwords were correct, Please help

Thank You

Hi @rs115199789 python 3.11 It’s already associated with the system, you can make sure if it is already installed,

python3 --version 

if the output is python 3.12 it’s Ok you can skip this step,

you can see my screenshoot:

Try running sudo apt update first then sudo apt install python3.11-venv.
If it doesn’t work you need to add the repository that contains the python3.11-venv to apt.

1 Like

@Faris_Alsolmi @gcunha
I understand it’s pre installed, but when i try to run the pipx command i’m getting this error.
Please check


> python3 -m pip install --user pipx
> python3 -m pipx ensurepath
> sudo pipx ensurepath --global # optional to allow pipx actions with --global argument

@Faris_Alsolmi @gcunha

Not working

when being in (venv) use APT, as seen in your screen no APT used, also to install pipx , the APT should be updated.

sudo apt update
sudo apt install pipx
pipx ensurepath
sudo pipx ensurepath --global

you can see this guide
it should work fine

@rs115199789 Happy to help you, Good Luck with frappe ! :innocent:

I will post a role permission issue tomorrow hope it will get sorted. And thanks for your help

1 Like