如何在 windows 上使用 python 2.7 安装美丽汤 4 [英] How to install beautiful soup 4 with python 2.7 on windows

查看:42
本文介绍了如何在 windows 上使用 python 2.7 安装美丽汤 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 Python 2.7 的 Windows Vista.我想安装 BeautifulSoup 4,但显然我无法通过将文件复制到 site-packages 目录来安装 Beautiful Soup.我必须安装 pip,然后从命令提示符运行一些命令.你能指导我一步一步来吗?我真的是一个菜鸟,所以让它变得非常简单.提前致谢

I have windows vista with Python 2.7. I would like to install BeautifulSoup 4 but apparently I can't install Beautiful Soup just by copying the file into the site-packages directory. I have to install pip and then run some commands from the command prompt. Could you guide me through that step by step. I am really a noob so make it very simple. Thanks in advance

推荐答案

你不需要需要 pip来安装 Beautiful Soup - 你可以 只需下载它并从您解压 BeautifulSoup 的目录中运行 python setup.py install(假设您已将 Python 添加到您的系统 PATH - 如果您没有的话)t 并且你不想你可以运行 C:PathToPython27python "C:PathToBeautifulSoupsetup.py" install)

You don't need pip for installing Beautiful Soup - you can just download it and run python setup.py install from the directory that you have unzipped BeautifulSoup in (assuming that you have added Python to your system PATH - if you haven't and you don't want to you can run C:PathToPython27python "C:PathToBeautifulSoupsetup.py" install)

但是,您确实应该安装 pip - 请参阅如何在 Windows 上安装 pip 如何做到最好(通过@MartijnPieters 评论)

However, you really should install pip - see How to install pip on Windows for how to do that best (via @MartijnPieters comment)

这篇关于如何在 windows 上使用 python 2.7 安装美丽汤 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆