install scrapy mac 2.7
I try install scrapy in my mac os x 1.8.5 and very difficult.
I try to install de "easy tools" (are not easy ;)) with instruction of page:
and the command:
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
but always error:
iMac-de-ERIKA:~ root$ curl bootstrap.pypa.io/ez_setup.py -o - | python % Total % Received % Average Speed Time Time Time Current Upload Total Spent Left Speed 100 11434 100 11434 0 0 48685 0 --:--:-- --:--:-- --:--:-- 61473 Downloading pypi.python.org/packages/source/s/setuptools/setuptools-18.0.1.zip Extracting in /tmp/tmpMz4MuT Now working in /tmp/tmpMz4MuT/asetuptools-18.0.1a Installing Setuptools running install Checking .pth file support in /Library/Python/2.7/site-packages/ error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-725.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /Library/Python/2.7/site-packages/ Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable. For information on other options, you may wish to consult the documentation at: pythonhosted.org/setuptools/easy_install.html Please make the appropriate changes for your system and try again. Something went wrong during the installation. See the error message above.
I have tried delete the directories with root user but allways:
iMac-de-ERIKA:~ root$ sudo rm -rf /Library/Python/2.7/site-packages rm: /Library/Python/2.7/site-packages/README: Permission denied rm: /Library/Python/2.7/site-packages: Permission denied
How apply the "--install-dir" parameter to this instruction? Some solution for install scrapy in my mac?
Can you help me?
Thanks so much!!!
With the caveat that this will install some other packages on the system apart from scrapy, I would recommend installing homebrew, then pip and then scrapy from it. The commands in order are
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install python brew install pip pip install scrapy
You can find more information about the packages on http://brew.sh/, https://pypi.python.org/pypi/pip respectively. Basically brew is a package manager for mac os x, and pip is a package manager for python. Installing python from brew installs pip with it, but just in case, you can install it explicitly.
Like the idea of Akshat however in my case I used sudo to install Python packages with pip -- including Scrapy. If you are the admin of your Mac try executing the above commands with sudo to get write access as it is stated in the error log.