<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://itecfun.com/extern.php?action=feed&amp;tid=3075&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[个人知识管理站 / Python   No module named BeautifulSoup]]></title>
		<link>http://www.itecfun.com/viewtopic.php?id=3075</link>
		<description><![CDATA[Python   No module named BeautifulSoup 最近发表的帖子。]]></description>
		<lastBuildDate>Wed, 25 Mar 2015 08:05:24 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Python   No module named BeautifulSoup]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=3173#p3173</link>
			<description><![CDATA[<p><a href="http://www.pythonclub.org/modules/beautifulsoup/start" rel="nofollow">http://www.pythonclub.org/modules/beautifulsoup/start</a></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 25 Mar 2015 08:05:24 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=3173#p3173</guid>
		</item>
		<item>
			<title><![CDATA[Python   No module named BeautifulSoup]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=3172#p3172</link>
			<description><![CDATA[<p>【问题】</p><p>python脚本，其中用到Beautifulsoup：</p><p>from BeautifulSoup import BeautifulSoup,Tag,CData;<br />为了支持Python 3，所以去主页：</p><p><a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">http://www.crummy.com/software/BeautifulSoup/</a></p><p>下载了beautifulsoup4-4.1.3.tar.gz，并安装了Beautifulsoup 4。</p><p>然后去运行python脚本，结果却还是出错：</p><p>Traceback (most recent call last):<br />&#160; File &quot;G:\34563264_data_from_site\34563264_data_from_site.py&quot;, line 38, in &lt;module&gt;<br />&#160; &#160; from BeautifulSoup import BeautifulSoup,Tag,CData;<br />ImportError: No module named BeautifulSoup<br />【解决过程】</p><p>1.后来是参考bs4的官网文档：</p><p><a href="http://www.crummy.com/software/BeautifulSoup/bs4/doc/" rel="nofollow">http://www.crummy.com/software/BeautifulSoup/bs4/doc/</a></p><p>去看到：</p><p>from bs4 import BeautifulSoup</p><p>soup = BeautifulSoup(open(&quot;index.html&quot;))</p><p>soup = BeautifulSoup(&quot;&lt;html&gt;data&lt;/html&gt;&quot;)<br />然后才知道，原来Beautifulsoup 4，改名为bs4了，所以把：</p><p>from BeautifulSoup import BeautifulSoup,Tag,CData;<br />改为：</p><p>from bs4 import BeautifulSoup,Tag,CData;<br />然后就可以消除此错误，可以正常使用Beautifulsoup了。</p><p> </p><p>【总结】</p><p>Python3，真的是很容易把人搞得头大啊。。</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 25 Mar 2015 08:05:06 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=3172#p3172</guid>
		</item>
	</channel>
</rss>
