title: ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
body: <p>I use <code>virtualenv</code> to create a python virtual environment for my python project.</p>
  <pre><code>#command
  pwd
  #result
  /home/dhanusha/Documents/projects/my-project
  
  # command
  virtualenv --version
  # results
  virtualenv 20.10.0 from /usr/local/lib/python3.8/dist-packages/virtualenv/__init__.py
  </code></pre>
  <p>I tried to create a virtual <code>python3.10</code> environment using the following command. I could create <code>venv</code> successfully.</p>
  <pre><code># creating venv
  virtualenv -p /usr/bin/python3.10 venv
  
  # then, I could activate the `venv` environment successfully using the following command.
  source venv/local/bin/activate
  
  # after activation python version shows:
  python -V
  # results
  Python 3.10.1
  
  # after activation pip version shows:
  pip -V
  #results
  pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
  
  </code></pre>
  <p>But when run <code>pip list</code> command, it shows an error:</p>
  <pre class="lang-sh prettyprint-override"><code>(venv) dhanusha@dhanusha-pc:~/Documents/projects/my-project$ pip list
  Traceback (most recent call last):
    File &quot;/home/dhanusha/Documents/projects/my-project/venv/local/bin/pip&quot;, line 8, in &lt;module&gt;
      sys.exit(main())
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/cli/main.py&quot;, line 73, in main
      command = create_command(cmd_name, isolated=(&quot;--isolated&quot; in cmd_args))
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/commands/__init__.py&quot;, line 96, in create_command
      module = importlib.import_module(module_path)
    File &quot;/usr/lib/python3.10/importlib/__init__.py&quot;, line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1050, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 688, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 883, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 241, in _call_with_frames_removed
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/commands/list.py&quot;, line 13, in &lt;module&gt;
      from pip._internal.cli.req_command import IndexGroupCommand
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py&quot;, line 15, in &lt;module&gt;
      from pip._internal.index.package_finder import PackageFinder
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py&quot;, line 21, in &lt;module&gt;
      from pip._internal.index.collector import parse_links
    File &quot;/usr/lib/python3/dist-packages/pip/_internal/index/collector.py&quot;, line 12, in &lt;module&gt;
      from pip._vendor import html5lib, requests
  ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
  (venv) dhanusha@dhanusha-pc:~/Documents/projects/my-project$ 
  
  </code></pre>
  <p>For your information:<br />
  OS: Ubuntu 20.04 LTS<br />
  <code>Python -V</code> command: <code>Python 3.8.10</code><br />
  <code>python3.10 -V</code> command: <code>Python 3.10.1</code></p>
  <p>How can I solve this issue? Thanks in advance.</p>