Error Import Module html5lib When Install Frappe Version 14

Hello , i want to install frappe version.14 dev on ubuntu 20.04 but when i want to create frappe project with command :

  • bench init frappe-14 --frappe-branch version-14 --python /usr/bin/python3.10

i got error message like this:

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/main.py”, line 19, in
sys.exit(_main())
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/cli/main.py”, line 73, in main
command = create_command(cmd_name, isolated=("–isolated" in cmd_args))
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/commands/init.py”, line 96, in create_command
module = importlib.import_module(module_path)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/commands/install.py”, line 24, in
from pip._internal.cli.req_command import RequirementCommand
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/cli/req_command.py”, line 15, in
from pip._internal.index.package_finder import PackageFinder
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/index/package_finder.py”, line 21, in
from pip._internal.index.collector import parse_links
File “/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_internal/index/collector.py”, line 12, in
from pip._vendor import html5lib, requests
ImportError: cannot import name ‘html5lib’ from ‘pip._vendor’ (/home/tab/Project/frappe-14/env/lib/python3.10/site-packages/pip/_vendor/init.py)
Traceback (most recent call last):
File “/home/tab/.local/lib/python3.8/site-packages/bench/commands/make.py”, line 70, in init
init(
File “/home/tab/.local/lib/python3.8/site-packages/bench/utils/render.py”, line 95, in wrapper_fn
return fn(*args, **kwargs)
File “/home/tab/.local/lib/python3.8/site-packages/bench/utils/system.py”, line 64, in init
bench.setup.env(python=python)
File “/home/tab/.local/lib/python3.8/site-packages/bench/utils/render.py”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/home/tab/.local/lib/python3.8/site-packages/bench/bench.py”, line 259, in env
self.pip()
File “/home/tab/.local/lib/python3.8/site-packages/bench/utils/render.py”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/home/tab/.local/lib/python3.8/site-packages/bench/bench.py”, line 291, in pip
return self.run(f"{self.bench.python} -m pip install {quiet_flag} --upgrade pip")
File “/home/tab/.local/lib/python3.8/site-packages/bench/bench.py”, line 43, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/home/tab/.local/lib/python3.8/site-packages/bench/utils/init.py”, line 126, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

any suggestion for me to solve this problem ? thank you

Hi @Mogul,

Please try and apply it.

bench init frappe-bench --frappe-path https://github.com/frappe/frappe --frappe-branch version-14 --python python3.10

Then check it. Maybe it help you!

Thank You!