from requests_html import HTMLSession
File "C:\Users\凡人\AppData\Local\Programs\Python\Python39\lib\site-packages\requests_html.py", line 11, in <module>
from pyquery import PyQuery
File "C:\Users\凡人\AppData\Local\Programs\Python\Python39\lib\site-packages\pyquery\__init__.py", line 5, in <module>
from .pyquery import PyQuery # NOQA
File "C:\Users\凡人\AppData\Local\Programs\Python\Python39\lib\site-packages\pyquery\pyquery.py", line 12, in <module>
import lxml.html
File "C:\Users\凡人\AppData\Local\Programs\Python\Python39\lib\site-packages\lxml\html\__init__.py", line 87, in <module>
_rel_links_xpath = etree.XPath("descendant-or-self::a[@rel]|descendant-or-self::x:a[@rel]",
AttributeError: 'function' object has no attribute 'XPath'
本人分别在pycharm和vscode中测试了都报出这样的问题.请高手给予指点.