'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work.'<>
2017-11-26 23:31
811 查看
1、安装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`).'
解决办法:
1、切换到解压目录下
root@gao:~/beautifulsoup4-4.6.0# pwd
/root/beautifulsoup4-4.6.0
2、将bs4目录拷贝到/usr/lib目录下,通常/usr/lib是python安装的目录
root@gao:~/beautifulsoup4-4.6.0# cp bs4/ -r /usr/lib/
3、切换到/usr/lib目录下,执行如下指令:
root@gao:~/beautifulsoup4-4.6.0# 2to3 bs4 -w
问题就解决了
'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`).'
解决办法:
1、切换到解压目录下
root@gao:~/beautifulsoup4-4.6.0# pwd
/root/beautifulsoup4-4.6.0
2、将bs4目录拷贝到/usr/lib目录下,通常/usr/lib是python安装的目录
root@gao:~/beautifulsoup4-4.6.0# cp bs4/ -r /usr/lib/
3、切换到/usr/lib目录下,执行如下指令:
root@gao:~/beautifulsoup4-4.6.0# 2to3 bs4 -w
问题就解决了
相关文章推荐
- 错误 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下Python3安装BeautifulSoup4显示'You are trying to run the Python 2 version of Beautiful Soup under
- Windows下使用BeautifulSoup 出现You are trying to run the Python 2 version of Beautiful Soup under Python
- Windows环境下安装beautifulsoup4出现 'You are trying to run the Python 2 version of Beautiful Soup ....错误
- This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workb
- Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.
- You are attempting to build with the incorrect version of java.
- docker 解决:Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
- You are attempting to build with the incorrect version of java.
- - Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.
- .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
- You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgrou
- "Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased."
- You are attempting to build with the incorrect version of java
- Python 3.0安装BeautifulSoup插件并使用 与Python 2 version of Beautiful Soup under Python 3问题处理
- The object of type 'RectTransform' has been destroyed but you are still trying to access it
- You are attempting to build with the incorrect version of java.
- Failure to find xxx in xxx was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ xxx
- 使用FABridge时,出现You are trying to call recursively into the Flash Player which is not allowed…错误的处理