安装BeautifulSoup [英] install BeautifulSoup

查看:356
本文介绍了安装BeautifulSoup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IM在我的Ubuntu上运行的Python 3.1.2 10.04

我需要安装以及如何这BeautifulSoup的版本?

我已经下载3.2版,并运行须藤python3 setup.py安装
但犯规作品

日Thnx

编辑:我得到的错误是:

 >>>进口BeautifulSoup
回溯(最近通话最后一个):
  文件<&标准输入GT;,1号线,上述<&模块GT;
  文件BeautifulSoup.py,行448
    提高AttributeError的,'%s'的对象有没有属性'%s'%(自我.__类__.__ name__,ATTR)
                        ^
语法错误:无效的语法
>>>


解决方案

唯一的系列BeautifulSoup的这与Python 3的工作原理是的 3.1 但是笔者已经放弃了它,并不会发布更新。你可以阅读更多有关问题这里

更新:这不再是真实的,BeautifulSoup 4工程上的Python 3.你可以用安装PIP安装beautifulsoup4

PIP安装BeautifulSoup 将安装版本3。

im running python 3.1.2 on my ubuntu 10.04

which version of BeautifulSoup i need to install and how?

i already download version 3.2 and run sudo python3 setup.py install but doesnt works

thnx

EDIT : The error i get is :

>>> import BeautifulSoup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "BeautifulSoup.py", line 448
    raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
                        ^
SyntaxError: invalid syntax
>>> 

解决方案

The only series of BeautifulSoup which works with Python 3 is 3.1 However the author has abandoned it and will not release updates. You can read more about the problems here.

UPDATE: This is no longer true, BeautifulSoup 4 works on Python 3. You can install it with pip install beautifulsoup4.

pip install BeautifulSoup will install version 3.

这篇关于安装BeautifulSoup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆