ERPNext installation error 'bench init erpnext"

Hello guys,
I am trying to install ERPNEXT system on my machine, following the steps provided in the link below:

but when I come to the command “bench init erpnext” , I got the following errors

erpnext@erp:~$ cd /srv/bench
erpnext@erp:/srv/bench$ bench init erpnext
Traceback (most recent call last):
File “/home/erpnext/.local/bin/bench”, line 6, in
from pkg_resources import load_entry_point
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3254, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3237, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 584, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 901, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘frappe-bench’ distribution was not found and is required by the application

Please execute the below command.

sudo -H pip3 install frappe-bench

Also, It is always recommended to follow official documentation for the installation process.
Ref: Installation

The best guide I have found for erpnext installation is this one:

You must change version 12 to 13 in the commands it prompts you for.

Good luck and welcome.

Thanks everyone for sharing your information.
I have done this command, but still not able to init the bench. Here is what I have got

bench init frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /home/erp2/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
Getting frappe
$ git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 3135, done.
remote: Counting objects: 100% (3135/3135), done.
remote: Compressing objects: 100% (2820/2820), done.
remote: Total 3135 (delta 396), reused 1181 (delta 215), pack-reused 0
Receiving objects: 100% (3135/3135), 15.95 MiB | 160.00 KiB/s, done.
Resolving deltas: 100% (396/396), done.
Installing frappe
$ /home/erp2/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/erp2/frappe-bench/apps/frappe
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [108 lines of output]
WARNING: The wheel package is not available.
ERROR: Exception:
Traceback (most recent call last):
File “/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py”, line 435, in _error_catcher
yield
File “/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py”, line 516, in read
data = self._fp.read(amt) if not fp_closed else b""
File “/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 90, in read
data = self.__fp.read(amt)
File “/usr/lib/python3.8/http/client.py”, line 459, in read
n = self.readinto(b)
File “/usr/lib/python3.8/http/client.py”, line 503, in readinto
n = self.fp.readinto(b)
File “/usr/lib/python3.8/socket.py”, line 669, in readinto
return self._sock.recv_into(b)
File “/usr/lib/python3.8/ssl.py”, line 1241, in recv_into
return self.read(nbytes, buffer)
File “/usr/lib/python3.8/ssl.py”, line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
      status = run_func(*args)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
      return func(self, options, args)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/commands/wheel.py", line 145, in run
      requirement_set = resolver.resolve(reqs, check_supported_wheels=True)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
      result = self._result = resolver.resolve(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
      state = resolution.resolve(requirements, max_rounds=max_rounds)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
      self._add_to_criteria(self.state.criteria, r, parent=None)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
      if not criterion.candidates:
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
      return bool(self._sequence)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
      return any(self)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
      return (c for c in iterator if id(c) not in self._incompatible_ids)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
      candidate = func()
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
      self._link_candidate_cache[link] = LinkCandidate(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
      super().__init__(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
      self.dist = self._prepare()
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
      dist = self._prepare_distribution()
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
      return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 438, in prepare_linked_requirement
      return self._prepare_linked_requirement(req, parallel_builds)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 483, in _prepare_linked_requirement
      local_file = unpack_url(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 165, in unpack_url
      file = get_http_url(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 106, in get_http_url
      from_path, content_type = download(link, temp_dir.path)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/network/download.py", line 147, in __call__
      for chunk in chunks:
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
      for chunk in response.raw.stream(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 573, in stream
      data = self.read(amt=amt, decode_content=decode_content)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 538, in read
      raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
    File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
      self.gen.throw(type, value, traceback)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 440, in _error_catcher
      raise ReadTimeoutError(self._pool, None, "Read timed out.")
  pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
  Traceback (most recent call last):
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
      subprocess.check_call(cmd)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/home/erp2/frappe-bench/env/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpjkkdthh7', '--quiet', 'requests<3.0,>=2.20.0']' returned non-zero exit status 2.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-s_e219_x/googlemaps_0c514a7f5dc14f9fa2af44e91a8f6cbd/setup.py", line 13, in <module>
      setup(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
      _install_setup_requires(attrs)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
      dist = best[req.key] = env.best_match(
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
      return self.obtain(req, installer)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
      return installer(requirement)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "/home/erp2/frappe-bench/env/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
      raise DistutilsError(str(e))
  distutils.errors.DistutilsError: Command '['/home/erp2/frappe-bench/env/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpjkkdthh7', '--quiet', 'requests<3.0,>=2.20.0']' returned non-zero exit status 2.
  [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.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
File “/home/erp2/.local/lib/python3.8/site-packages/bench/commands/make.py”, line 68, in init
init(
File “/home/erp2/.local/lib/python3.8/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/home/erp2/.local/lib/python3.8/site-packages/bench/utils/system.py”, line 79, in init
get_app(
File “/home/erp2/.local/lib/python3.8/site-packages/bench/app.py”, line 432, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/home/erp2/.local/lib/python3.8/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/home/erp2/.local/lib/python3.8/site-packages/bench/app.py”, line 230, in install
install_app(
File “/home/erp2/.local/lib/python3.8/site-packages/bench/app.py”, line 561, in install_app
bench.run(
File “/home/erp2/.local/lib/python3.8/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/home/erp2/.local/lib/python3.8/site-packages/bench/utils/init.py”, line 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]:

Is it because of the Python version? You must upgrade or downgrade it depending on the version of ERPNext you are installing.