ModuleNotFoundError: No module named 'pycountry'

This error is appearing on the submission of the invoice. Anyone facing the same?

Traceback (most recent call last):
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 64, in application
response = frappe.api.handle()
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 58, in handle
return frappe.handler.handle()
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 30, in handle
data = execute_cmd(cmd)
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 69, in execute_cmd
return, **frappe.form_dict)
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 1085, in call
return fn(*args, **newargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/desk/form/”, line 19, in savedocs
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 890, in submit
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 879, in _submit
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 281, in save
return self._save(*args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 316, in _save
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 923, in run_before_save_methods
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 820, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/erpnext/erpnext/apps/frappe/frappe/model/”, line 1109, in composer
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 1076, in get_attr
return getattr(get_module(modulename), methodname)
File “/opt/erpnext/erpnext/apps/frappe/frappe/”, line 853, in get_module
return importlib.import_module(modulename)
File “/opt/erpnext/erpnext/env/lib/python3.6/importlib/”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/opt/erpnext/erpnext/apps/erpnext/erpnext/erpnext_integrations/”, line 3, in
import pycountry
ModuleNotFoundError: No module named ‘pycountry’

I already pip install pycountry and pip3 install pycountry

Can you try running:

bench setup requirements and see if that works

If that doesn’t work, maybe:

bench pip install -r ./apps/erpnext/requirements.txt

or even

bench pip install pycountry?