? The recent project used Python to crawl and there was a little problem installing the PIP, which is documented:
The PIP is a common Python package management tool, similar to Java maven. With the students of Python, you can't live without PIP. There are a few minor problems when you want to install the PIP with home-brew in the new Mac:
jianming:~ kang$ Brew install PIP
Error:no available formula with the name "Pip"
Homebrew provides pip via: ' Brew Install Python '. However you'll then
have two pythons installed on your Mac, so alternatively you can install
pip via the Instruc tions at:
https://pip.readthedocs.org/en/stable/installing/#install-pip
Thus, in home-brew, the PIP is installed with Python.
jianming:~ kang$ sudo easy_install pip
Password:
searching for pip
Reading https://pypi.python.org/ simple/pip/...
The installation was successful. The following issues occurred while installing Pyspider:
Found existing Installation:six 1.4.1
Deprecation:uninstalling a distutils installed project (six) has been deprecated and'll is removed in a future version. This is due to the fact that uninstalling a distutils project would only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/library/python/2.7/site-packages/pip/basecommand.py", line 209, in main
Status = Self.run (options, args)
File "/library/python/2.7/site-packages/pip/commands/install.py", line 317, in run
Prefix=options.prefix_path,
File "/library/python/2.7/site-packages/pip/req/req_set.py", line 726, in install
Requirement.uninstall (Auto_confirm=true)
File "/library/python/2.7/site-packages/pip/req/req_install.py", line 746, in Uninstall
Paths_to_remove.remove (auto_confirm)
File "/library/python/2.7/site-packages/pip/req/req_uninstall.py", line up, in remove
Renames (path, New_path)
File "/library/python/2.7/site-packages/pip/utils/Init. py ", line 267, in renames
Shutil.move (old, new)
File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/shutil.py", line 302, in move
Copy2 (SRC, REAL_DST)
File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/shutil.py", line 131, in Copy2
Copystat (SRC, DST)
File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/shutil.py", line $, in Copystat
Os.chflags (DST, St.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-kgtuuf-uninstall/system/library/frameworks/python.framework/ Versions/2.7/extras/lib/python/six-1.4.1-py2.7.egg-info '
The Final Solution in this blog: http://xiaorui.cc/2016/03/27/%E8%A7%A3%E5%86%B3mac-osx%E4%B8%8Bpip%E5%AE%89%E8%A3%85ipython%E6% 9d%83%e9%99%90%e7%9a%84%e9%97%ae%e9%a2%98/