`
flex_莫冲
  • 浏览: 1075843 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Beautiful soup安装初运行遇到的问题解决

阅读更多
1、 下载:

https://www.crummy.com/software/BeautifulSoup/#Download

2、文档:

https://www.crummy.com/software/BeautifulSoup/bs4/doc/

3、安装,两种方法:

1、windows下cmd进入bs根目录:C:\Python34\python.exe  setup.py install

会在python根目录C:\Python34\Lib\site-packages生成beautifulsoup4-4.4.1-py3.4.egg文件

2:拷贝:直接把解压的文件下的bs4文件夹拷贝到Lib目录底下



4、遇到的问题:

初次运行的时候,提示:

You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>'You need to convert the code, either by installing it (python setup.py install) or by running 2to3 (2to3 -w bs4).

尝试解决:

针对第一种安装方法:cmd命令行下>> python C:\Python34\Tools\Scripts\2to3.py -w bs4

针对第二种安装方法:cmd命令行下,先进入bs4的库文件夹,然后执行上面命令
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics