python - 来自 : can't read/var/mail/BeautifulSoup 的 BS4 和 BeautifulSoup 错误

标签 python beautifulsoup

<分区>

From Beautiful import Beautiful 立即响应错误“from: can't read/var/mail/BeautifulSoup”。也尝试了 BS4 相同的结果。 使用突触包卸载并重新安装 BS4 和 BeautifulSoup。同样的结果。尝试完全删除并得到相同的结果。使用终端,它显示没有安装 BS4 和 BeautifulSoup。

使用 Python 2.7.6

审阅了问题,但只有 2 个回复,他们没有帮助。

有什么建议吗?

最佳答案

我遇到这个错误是因为我忘记在我的 python 脚本中添加一个 shebang 语句。只需将其添加到脚本的顶部:

#!/usr/bin/python

关于python - 来自 : can't read/var/mail/BeautifulSoup 的 BS4 和 BeautifulSoup 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32026201/

相关文章:

Python 和 Beautifulsoup 网页抓取 - 选择具有特定子标签的段落

python - 正则表达式在 bs4 中不起作用

python - Gensim: KeyError: "word not in vocabulary"

python - 如何删除作为短信发送的 "[Attachment(s) removed]"字符串?

python - os.environ ['http_proxy' ] 不工作

python - 在 Python 中启动带有 Restful 服务的 Spark-Submit

python - 只能访问某些具有负索引的 BeautifulSoup 结果元素

python - 客户端从tornado网络服务器下载完成后如何调用函数?

python - BeautifulSoup 断言错误

python - Beautiful Soup For 循环给了我单独的列表,但是需要一个数据框