Windows下使用BeautifulSoup 出现You are trying to run the Python 2 version of Beautiful Soup under Python
解决方法: 需要将bs4通过python自带的工具2to3.py转化为python3下的文件,这个工具在python安装目录的Tools\scripts中。
去BeautifulSoup安装目录或者解压目录下,拷贝bs4的库文件夹到python安装目录的Lib中,然后cmd进入这个Lib文件夹,输入python 2to3.py文件路径 -w bs4
导入其他库出现这种情况应该也可以这样解决。