beautifulsoup自己去官网下载
解压下载文件,E:\Python\beautifulsoup4-4.6.0注意路径中间不能有空格
1. 运行cmd,最好是右键,管理员身份进入
2. Cd /dE:\Python\beautifulsoup4-4.6.0\ 进入解决目录
3. Python3的朋友执行 pythonE:\Python\beautifulsoup4-4.6.0\setup.py build
4. 接着执行python E:\Python\beautifulsoup4-4.6.0\setup.py install
5. 测试 from bs4 impot beautifulsoup
6. 如果不成功遇到You are trying to run the Python 2 version of Beautiful Soupunder 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`).
7. 将解压出来的目录下面BS4剪切到python安装目录lib下面
8. 将python自带2to3.py剪切到lib(2to3.py在python安装目录下的Tools/scripts/里)
9. Cd /d E:\Program Files\python\Lib\ 切换到lib目录下面
10. 执行python 2to3.py bs4 -w
11. 测试from bs4 impot beautifulsoup