![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python常见问题解决
努力的小学弟
这个作者很懒,什么都没留下…
展开
-
bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
我刚开始学些爬虫,用的是Pycharm编译器,在爬虫的时候用到了BeautifulSoup,里面涉及到lxml,如下图所示:运行之后便报如下错误:bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml.百度过后才发现,这里报错的意思是:你的开发环境下下载的包里不存在你需要的lxml,目录下有没有你需要的包,如果没有就安装一个。就是这么简单。所以对于使用Pycharm的人来说,通过原创 2020-09-10 10:53:46 · 1131 阅读 · 0 评论 -
from fake_useragent import UserAgent导入后无法引用解决方法
我在学习写爬虫的时候,需要用到fake_useragent,刚开始的时候,我按照网络上的教程,通过cmd输入pip install fake_useragent来实现安装fake_useragent,如下所示但是安装完成后发现:from fake_useragent import UserAgent还是提示错误,这就让我非常疑惑:这里我使用的是Pycharm,通过点击File ->Setting,打开设置设置界面,如下所示:点击右边的**+号,然后输入fake-useragent,点击导入原创 2020-09-09 15:01:56 · 11887 阅读 · 3 评论