我一直在尝试Scrapy
使用pip进行安装,以获取本赛季的NBA日程安排和得分。一直在努力尝试在最近6个小时内安装它。我已经按照设置说明进行了逐字检查,但仍然无法使它正常工作。任何帮助将不胜感激。终端窗口输出如下。非常感谢!使用mac osx btw。
Requirement already satisfied (use --upgrade to upgrade): Scrapy in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg
Downloading/unpacking Twisted>=10.0.0 (from Scrapy)
Downloading Twisted-13.2.0.tar.bz2 (2.7MB): 2.7MB downloaded
Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/Twisted/setup.py) egg_info for package Twisted
Downloading/unpacking w3lib>=1.2 (from Scrapy)
Downloading w3lib-1.5.tar.gz
Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/w3lib/setup.py) egg_info for package w3lib
Downloading/unpacking queuelib (from Scrapy)
Downloading queuelib-1.1.1.tar.gz
Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/queuelib/setup.py) egg_info for package queuelib
Downloading/unpacking lxml (from Scrapy)
Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/lxml/setup.py) egg_info for package lxml
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.5.
Building without Cython.
Using build configuration of libxslt 1.1.28
warning: no previously-included files found matching '*.py'
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyOpenSSL-0.14-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cssselect-0.9.1-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.6.1-py2.7.egg (from Scrapy)
Downloading/unpacking zope.interface>=3.6.0 (from Twisted>=10.0.0->Scrapy)
Downloading zope.interface-4.1.1.tar.gz (864kB): 864kB downloaded
Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/zope.interface/setup.py) egg_info for package zope.interface
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy)
Downloading cryptography-0.3.tar.gz (208kB): 208kB downloaded
首次安装加密:
brew install pkg-config libffi
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
pip install cryptography
然后使用以下命令安装lxml:
xcode-select --install
然后使用以下命令安装scrapy:
pip install Scrapy
要么
easy_install Scrapy