如何检查我的 BeautifulSoup 版本并将其恢复为旧版本?
我正在使用 beautifulsoup,并且我收到一些带有开始标记等的 htmlparser 错误。
我在 crummy 的网站上读到,一个建议是返回到旧版本(3.08)。
我正在使用 Ubuntu,我是这样做的:
sudo apt-get install python-beautifulsoup
来安装它。
- 我如何查看我现在拥有的版本?
- 如何使用 apt-get 强制使用特定版本? (以及如何卸载我现在拥有的)
谢谢(我是 ubuntu 的新手)
最新版本的 ubuntu 10.04
I am using beautifulsoup, and I am getting some htmlparser errors with start tags etc.
I read on crummy's site that one suggestion is to go back to an older version (3.08).
I am using Ubuntu, where I did:
sudo apt-get install python-beautifulsoup
to install it.
- how can I check what version I have now?
- how can I force a specific version using apt-get? (and how to uninstall what I have now)
thanks (i'm newish to ubuntu)
latest version of ubuntu 10.04
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
《美丽汤4》里是这样的:
In Beautiful Soup 4 its like this:
我在 mac osx 10.5 上遇到同样的问题
我删除了当前版本的 beautiful soup,
然后从 this 安装了 3.0.7 地址,现在一切正常。
要了解模块的当前版本:
i run in the same problem on mac osx 10.5
and i removed the current version of beautiful soup with
then i installed 3.0.7 from this address and all is now working fine.
To know the current version of you module:
回答你的第一个问题:在 shell 提示符下,输入
Answer to your first question: at your shell prompt, type
对于你的第一个问题:
对于第二个问题:
你不能。也许你应该使用 easy_install 或 pip 代替。
For your first question:
And for the second:
You can't. Maybe you should use easy_install or pip instead.