Home > Mobile >  How hi do solve
How hi do solve

Time:11-13

 File "c:\python.teste\taste.py\python.py", line 12, in <module>
    soup = BeautifulSoup(src, "lxml")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\MASTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\bs4\__init__.py", line 248, in __init__
    raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

i tried to solved but i can't

CodePudding user response:

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> lxml

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

whean i wriet pip install lxml

CodePudding user response:

1.pip install wheel 2.pip debug-verbose 3.http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost 4.download the corresponding Lxml,my py is 3.11.0,so I download the 4.9.0-cp311-amd64. 5.use powershell pip the whl Like D: pip install lxml-4.9.0........ 6.successful and add to the PyCycharm. Good luck.

  • Related