You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.
来源:互联网 发布:男士护肤套装 知乎 编辑:程序博客网 时间:2024/06/05 03:23
在python3下直接使用安装的BeautifulSoup包会提示下面这段错误:
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`)
解决方案之一:
将beautifulsoup文件夹下的bs4转换成python3的版本即可,
使用python3安装目录下lib文件夹中的2to3命令
如果将python3添加到了环境变量中则可以直接使用命令,如果没有则需要定位到python3安装目录下的lib目录
2to3 /beautifulsoup/bs4(beautifulsoup安装目录下的bs4) -w
阅读全文
0 0
- You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.
- 错误 You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work
- 'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>
- Windows下使用BeautifulSoup 出现You are trying to run the Python 2 version of Beautiful Soup under Python
- Windows下Python3安装BeautifulSoup4显示'You are trying to run the Python 2 version of Beautiful Soup under
- Windows环境下安装beautifulsoup4出现 'You are trying to run the Python 2 version of Beautiful Soup ....错误
- Python 3.0安装BeautifulSoup插件并使用 与Python 2 version of Beautiful Soup under Python 3问题处理
- This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workb
- POI生成Excel如果并发的情况报错This Style does not belong to the supplied Workbook. Are you trying to assign a s
- python Beautiful Soup文档
- Python Beautiful Soup简介
- Python Beautiful Soup Example
- [Python]安装Beautiful Soup
- python 安装 Beautiful Soup
- Python模块Beautiful Soup
- The object of type 'RectTransform' has been destroyed but you are still trying to access it
- This version of Visual Studio .NET does not support source controlled projects. Any changes that you make to this project will n
- python Beautiful Soup分析网页
- LeetCode题目: 7.Reverse Integer
- vi中如何跳转到指定行数
- 测试
- HDU 5521 Meeting 建图+最短路
- LeetCode题目: 8. String to Integer (atoi)
- You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.
- Eclipse中打开.class文件的方法
- 数据库连接池技术介绍(空间换时间)
- 实验二:命令行菜单小程序V1.0
- 机器学习
- LeetCode题目:9.Palindrome Number
- 插件SQLScout使用
- 线程中调用Toast闪退解决方案
- 【数学建模】CUMCM-2009B 眼科病床的合理安排 解题思路整理