Failed to install scrapy with Pip under Mac OS El Capitan

Source: Internet
Author: User
Environment: Python 2.7,python 3.4 installed at the same time
Use the Install command pip install Scrapy
Download Normal
Error during installation:
Installing collected Packages:scrapy, six, Queuelib, lxml, W3lib, Cssselect
Cleaning up ...
Traceback (most recent call last):
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", line 122, in main
Status = (options, args)
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/", line 283, in run
Requirement_set.install (Install_options, global_options, Root=options.root_path)
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", line 1435, in install
Requirement.install (Install_options, Global_options, *args, **kwargs)
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", line 671, in install
Self.move_wheel_files (Self.source_dir, Root=root)
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", Line 901, in Move_wheel_files
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", line 215, in Move_wheel_files
Clobber (source, Lib_dir, True)
File "/library/python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/", line 205, in clobber
Os.makedirs (Destdir)
File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/", line 157, in Makedirs
mkdir (name, mode)

OSError: [Errno] Permission denied: '/library/python/2.7/site-packages/scrapy '

Reason: Using administrator privileges


sudo pip install Scrapy

But .....


Traceback (most recent call last):

File "/library/python/2.7/site-packages/pip/", line 211, in main

Status = (options, args)

File "/library/python/2.7/site-packages/pip/commands/", line 311, in run


File "/library/python/2.7/site-packages/pip/req/", line 640, in install

Requirement.uninstall (Auto_confirm=true)

File "/library/python/2.7/site-packages/pip/req/", line 716, in Uninstall

Paths_to_remove.remove (auto_confirm)

File "/library/python/2.7/site-packages/pip/req/", line and in remove

Renames (path, New_path)

File "/library/python/2.7/site-packages/pip/utils/", line 315, in renames

Shutil.move (old, new)

File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/", line 302, in move


File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/", line 131, in Copy2

Copystat (SRC, DST)

File "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/", line $, in Copystat

Os.chflags (DST, St.st_flags)

OSError: [Errno 1] Operation not permitted: '/tmp/pip-ms2tu1-uninstall/system/library/frameworks/python.framework/ Versions/2.7/extras/lib/python/six-1.4.1-py2.7.egg-info '


Some people are facing problems for Python installation on El Capitan.


Brew Reinstall Python

Problem solved!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: