Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

4.2K
Views
ImportError: no se puede importar el nombre 'html5lib' de 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)

Uso virtualenv para crear un entorno virtual de python para mi proyecto de python.

 #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

Traté de crear un entorno virtual python3.10 usando el siguiente comando. Podría crear venv con éxito.

 # 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)

Pero cuando ejecuta el comando pip list , muestra un error:

 (venv) dhanusha@dhanusha-pc:~/Documents/projects/my-project$ pip list Traceback (most recent call last): File "/home/dhanusha/Documents/projects/my-project/venv/local/bin/pip", line 8, in <module> sys.exit(main()) File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "/usr/lib/python3/dist-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 "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 13, in <module> from pip._internal.cli.req_command import IndexGroupCommand File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 15, in <module> from pip._internal.index.package_finder import PackageFinder File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 21, in <module> from pip._internal.index.collector import parse_links File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 12, in <module> 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$

Para tu información:
SO: Ubuntu 20.04 LTS
Comando Python -V : Python 3.8.10
python3.10 -V comando: Python 3.10.1

¿Cómo puedo solucionar este problema? Gracias por adelantado.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Si se ha enfrentado a este error, consulte esta respuesta . Para ahorrarle tiempo, publicaré lo que he hecho para resolver el problema.

Instale el último pip con el siguiente comando:

 curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!