ModuleNotFoundError: No module named 'pydantic'

praful_d@pc:~/frappe-bench/frappe-bench/frappe-bench$ bench --site webeaz migrate
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.10/runpy.py”, line 110, in _get_module_details
import(pkg_name)
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/init.py”, line 1375, in
def rename_doc(
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/init.py”, line 794, in innerfn
from frappe.utils.typing_validations import validate_argument_types
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/utils/typing_validations.py”, line 7, in
from pydantic import ConfigDict
ModuleNotFoundError: No module named ‘pydantic’

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.10/runpy.py”, line 110, in _get_module_details
import(pkg_name)
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/init.py”, line 1375, in
def rename_doc(
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/init.py”, line 794, in innerfn
from frappe.utils.typing_validations import validate_argument_types
File “/home/praful_d/frappe-bench/frappe-bench/frappe-bench/apps/frappe/frappe/utils/typing_validations.py”, line 7, in
from pydantic import ConfigDict
ModuleNotFoundError: No module named ‘pydantic’

i uninstalled and again installed pydantic .but did’nt work .Help

Help @NCP

run

bench setup requirements
1 Like

in your vscode setup activate the frappe-bench virtual environment and

pip install pydantic

@PRaful_9898 bench pip install pydantic

1 Like

Hi @PRaful_9898,

You can also check the post for reference:

Otherwise, please update the bench and check it. but first, take a backup of your site.

I hope this helps.

Thank You!

2 Likes

Work for me !