How can I install the Beautiful Soup module on the Mac?

后端 未结 6 1930
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 16:37

I read this without finding the solution: http://docs.python.org/install/index.html

6条回答
  •  你的背包
    2021-01-30 16:51

    The "normal" way is to:

    • Go to the Beautiful Soup web site, http://www.crummy.com/software/BeautifulSoup/
    • Download the package
    • Unpack it
    • In a Terminal window, cd to the resulting directory
    • Type python setup.py install

    Another solution is to use easy_install. Go to http://peak.telecommunity.com/DevCenter/EasyInstall), install the package using the instructions on that page, and then type, in a Terminal window:

    easy_install BeautifulSoup4
    # for older v3:
    # easy_install BeautifulSoup
    

    easy_install will take care of downloading, unpacking, building, and installing the package. The advantage to using easy_install is that it knows how to search for many different Python packages, because it queries the PyPI registry. Thus, once you have easy_install on your machine, you install many, many different third-party packages simply by one command at a shell.

提交回复
热议问题