Невозможно установить модуль html с помощью pip install html - PullRequest
0 голосов
/ 20 марта 2020
C:\Users\HP>pip install html
Collecting html
  Using cached html-1.16.tar.gz (7.6 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\hp\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-3h28loxi\\html\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-3h28loxi\\html\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-3h28loxi\html\pip-egg-info'
         cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-3h28loxi\html\
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\__init__.py", line 20, in <module>
        from setuptools.depends import Require
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\depends.py", line 6, in <module>
        from .py33compat import Bytecode
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\py33compat.py", line 11, in <module>
        from setuptools.extern.six.moves import html_parser
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\_vendor\six.py", line 92, in __get__
        result = self._resolve()
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\_vendor\six.py", line 115, in _resolve
        return _import_module(self.mod)
      File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\setuptools\_vendor\six.py", line 82, in _import_module
        __import__(name)
    ModuleNotFoundError: No module named 'html.parser'; 'html' is not a package
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 Ответ

1 голос
/ 20 марта 2020

html и html.parser являются модулями из стандартной библиотеки. Вам не нужно устанавливать их, они доступны с Python установкой.

То, что вы установили с pip install html, это https://pypi.org/project/html/, что является совершенно другим пакетом и у него нет html.parser подпакета.

Чтобы решить вашу проблему, удалите неправильно html:

pip uninstall html
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...