Windows环境下安装beautifulsoup4出现 'You are trying to run the Python 2 version of Beautiful Soup ....错误
来源:互联网 发布:列强瓜分中国知乎 编辑:程序博客网 时间:2024/06/05 04:48
出现这个问题的主要原因是Python的版本问题。官网上面有说明:Beautiful Soup 4 works on both Python 2 (2.6+) and Python 3.
所以在3.4+的版本上安装beautifulsoup4时会出现如下错误:
解决办法是:
使用在线安装的步骤如下:
(1)进入Python的安装目录,找到Scripts文件夹,然后进入里面,可以看到如下可执行文件(我使用的Python3.6.x):
(2)如果之前安装过,切安装失败,则首先执行以下命令卸载beautifulsoup4:
pip install beautifulsoup4
(3)使用pip3.6.exe安装beautifulsoup4,记住一定不要使用pip.exe进行安装,不然还会出现版本不同的问题。(当然如果你使用的是2.x的版本,那么你可以使用pip.exe进行安装)
安装命令:pip3.6 install beautifulsoup4
(4)如果出现如下结果则表示安装成功:
到这里在线安装beautifulsoup4基本结束。
可以在Python环境下使用from bs4 import BeautifulSoup验证是否成功安装,如果没有错误出现,那么就表示已经安装成功了。
如果依然安装失败,则可以使用easy_install-3.6.exe命令进行在线安装,步骤与上面基本一致。
离线安装时需要去官网上下载BeautifulSoup4的安装包,然后解压到某一个文件夹下。然后进入该文件夹,打开cmd,切换到刚刚解压完的文件夹下。使用Python install beautifulsoup4进行安装。
- Windows环境下安装beautifulsoup4出现 'You are trying to run the Python 2 version of Beautiful Soup ....错误
- 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
- 错误 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.'<>
- Python自学|Windows 下安装beautiful soup 4-4.4.1
- Python 3.0安装BeautifulSoup插件并使用 与Python 2 version of Beautiful Soup under Python 3问题处理
- windows 64 python beautiful soup 安装
- Windows和Mac下安装Beautiful Soup
- windows下如何安装beautiful soup
- windows 安装Beautiful Soup
- [Python]安装Beautiful Soup
- python 安装 Beautiful Soup
- The object of type 'RectTransform' has been destroyed but you are still trying to access it
- 使用FABridge时,出现You are trying to call recursively into the Flash Player which is not allowed…错误的处理
- Windows平台安装Beautiful Soup
- Windows平台安装Beautiful Soup
- UPX壳分析
- Java基础入门2
- 缺省参数
- python-fun2
- Linux netstat命令详解
- Windows环境下安装beautifulsoup4出现 'You are trying to run the Python 2 version of Beautiful Soup ....错误
- 2017年7月8日23:40:48
- 问题1:Maven-war项目中的jsp标签开始存在红叉且错误信息为:The superclass "javax.servlet.http.HttpServlet" was not found on
- Android自定义UI有哪些基本控件以及需求
- 在windows上运行python程序
- 51Nod-1519-拆方块
- Unsafe类compareAndSwapInt返回值
- SetWindowsHookEx
- BZOJ 2431: [HAOI2009]逆序对数列 dp