python-3.x - Python3 的 bs4( BeautifulSoup )在 visual studio 中不起作用

标签 python-3.x beautifulsoup visual-studio-2017

我是 Python 的新手,我已经遇到库错误,我在 visual studio 社区版 2017 上运行 python 3。我已经在安装过程中安装了 anaconda3 64 位,但问题是当我调用 bs4 库时( BeautifulSoup) 它返回一个错误,告诉我该模块不存在,如图所示:

error message

如何正确安装?

最佳答案

你需要将它添加到项目的虚拟环境中
工具 -> Python -> Python 环境
它将在右侧打开一个侧边栏
单击“概述”选择“程序包”然后搜索“BeautifulSoup4”并单击“安装”
现在它在你的项目中

关于python-3.x - Python3 的 bs4( BeautifulSoup )在 visual studio 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46353567/

相关文章:

python-3.x - 连接多个具有相同列名的 CSV

python - 如何在 Python 中打印出具有 bool 值的列表中的字典?

python - 无法在 BeautifulSoup 中获得正确的链接

visual-c++ - 错误 LNK1104 : cannot open file 'libcpmtd.lib'

ios - 如何使用 visual studio 2017 在 mac 上更新 xamarin.ios?

asp.net-core - Visual Studio 2017 : The SDK resolver type "DotNetMSBuildSdkResolver" failed to load

Python OOP,方法/类中参数的类型验证

python - 如何从多个常见元素的嵌套列表创建数据框

python - 从没有指导性 HTML 结构的具有挑战性的网站中抓取信息

python - Python 中的 Scraper 给出 "Access Denied"