If wget is not installed under mac, you also need to install wget, see http://www.cnblogs.com/cocowool/archive/2012/06/24/2560574.html
Install the Python library using pip. pip is a package management tool for Python. After installation, you can directly install/manage various libraries on the command line in one stop (pip documentation).
$ wget http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz
$ tar xzf pip-0.7.2.tar.gz
$ cd pip-0.7.2
$ python setup.py install
Then install pyspider, and the following prompt appears:
yemadeMacBook-Pro:pip-0.7.2 zhaoliang$ pip install pyspider -bash: pip: command not found
It is prompted that you need to download the official command line, and then when you install the command line, it prompts:
yemadeMacBook-Pro:pip-0.7.2 zhaoliang$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
You must download the latest version of Command Line with official tools, download address https://developer.apple.com/downloads/index.action?name=for%20Xcode%20
Note that you need to correspond to the version number of the mac here. After the installation is complete, execute pip install pyspider again and there will be no problem. (Note here, if the network speed is not good, there will be multiple unsuccessful installations).
run
Running is very simple, just enter pyspider on the command line, and visit http://localhost:5000 after completion.