Python 安装scrapy mac 2.7
我尝试在mac os x 1.8.5中安装scrapy,但非常困难 我尝试按照页面说明安装de“easy tools”(不容易;):Python 安装scrapy mac 2.7,python,macos,curl,scrapy,Python,Macos,Curl,Scrapy,我尝试在mac os x 1.8.5中安装scrapy,但非常困难 我尝试按照页面说明安装de“easy tools”(不容易;): https://pypi.python.org/pypi/setuptools 和命令: curl https://bootstrap.pypa.io/ez_setup.py -o - | python 但总是错误: iMac-de-ERIKA:~ root$ curl bootstrap.pypa.io/ez_setup.py -o - | python
https://pypi.python.org/pypi/setuptools
和命令:
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
但总是错误:
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.
我已尝试使用root用户删除目录,但始终:
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
如何将“-install dir”参数应用于此指令?
在我的mac上安装scrapy的一些解决方案
你能帮我吗
非常感谢
Xavier。有一点需要注意,这将在系统上安装除scrapy之外的其他一些软件包,我建议先安装自制软件,然后安装pip,然后再安装scrapy。 命令顺序如下:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python
brew install pip
pip install scrapy
您可以分别在上找到有关包的更多信息。
基本上,brew是mac os x的包管理器,而pip是python的包管理器。从brew安装python会安装pip,但为了以防万一,您可以显式安装它。就像我的例子一样,我使用sudo
安装带有pip
的python包,包括Scrapy。如果您是Mac的管理员,请尝试使用sudo
执行上述命令,以获得错误日志中所述的写访问权限