Bench setup production not working

when i run ‘bench setup production frappe’
i am getting bellow error

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (Jinja2 3.1.2 (/usr/local/lib/python3.8/dist-packages), Requirement.parse('Jinja2==2.10.3'), {'bench'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3192, in <module>
    def _initialize_master_working_set():
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Jinja2==2.10.3' distribution was not found and is required by bench

Please help I am stuck

Can anyone help regarding?

Hi,

It may help to describe the operating environment and version of Frappe/ERPNext.

The message suggests the Jinja2 package that is installed is not the right version. How was it installed?

Also the setup production command is usually run with sudo.

I used manual intsallation process.

https://frappeframework.com/docs/v14/user/en/bench/guides/setup-production

Follow above documents