I'm trying to install Scrapy, but it fails and I can't figure out what to do. I'm pretty novice at command line and python. It appears to be failing due to a package called cffi not being compiled. I'm running Mac OSx 10.5.8. Xcode version 3.0 installed.
Does anyone have any idea why this is failing or what I can do about it? Thanks!
-Matt
Here's the output when I try to install using pip:
$ pip install scrapy
Downloading/unpacking scrapy
Downloading Scrapy-0.24.4-py2-none-any.whl (444kB): 444kB downloaded
Downloading/unpacking pyOpenSSL (from scrapy)
Downloading pyOpenSSL-0.14.tar.gz (128kB): 128kB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/pyOpenSSL/setup.py) egg_info for package pyOpenSSL
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
Downloading/unpacking six>=1.5.2 (from scrapy)
Downloading six-1.8.0-py2.py3-none-any.whl
Downloading/unpacking queuelib (from scrapy)
Downloading queuelib-1.2.2-py2.py3-none-any.whl
Downloading/unpacking lxml (from scrapy)
Downloading lxml-3.4.1.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/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.4.1.
Building without Cython.
Using build configuration of libxslt 1.1.12
Minimum required version of libxslt is 1.1.12, found 1.1.23
Building against libxml2/libxslt in the following directory: /usr/lib
warning: no previously-included files found matching '*.py'
Downloading/unpacking w3lib>=1.8.0 (from scrapy)
Downloading w3lib-1.10.0-py2.py3-none-any.whl
Downloading/unpacking cssselect>=0.9 (from scrapy)
Downloading cssselect-0.9.1.tar.gz
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cssselect/setup.py) egg_info for package cssselect
no previously-included directories found matching 'docs/_build'
Downloading/unpacking Twisted>=10.0.0 (from scrapy)
Downloading Twisted-14.0.2.tar.bz2 (4.3MB): 4.3MB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/Twisted/setup.py) egg_info for package Twisted
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->scrapy)
Downloading cryptography-0.7.1.tar.gz (247kB): 247kB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cryptography/setup.py) egg_info for package cryptography
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
Downloading/unpacking zope.interface>=3.6.0 (from Twisted>=10.0.0->scrapy)
Downloading zope.interface-4.1.2.tar.gz (919kB): 919kB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/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 cffi>=0.8 (from cryptography>=0.2.1->pyOpenSSL->scrapy)
Downloading cffi-0.8.6.tar.gz (196kB): 196kB downloaded
Running setup.py (path:/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi/setup.py) egg_info for package cffi
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi/setup.py", line 86, in <module>
ask_supports_thread()
File "/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi/setup.py", line 49, in ask_supports_thread
ok = config.try_compile('__thread int some_threadlocal_variable_42;')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/config.py", line 230, in try_compile
self._check_compiler()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/config.py", line 103, in _check_compiler
customize_compiler(self.compiler)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 171, in customize_compiler
_osx_support.customize_compiler(_config_vars)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 418, in customize_compiler
_find_appropriate_compiler(_config_vars)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 191, in _find_appropriate_compiler
"Cannot locate working compiler")
SystemError: Cannot locate working compiler
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi/setup.py", line 86, in <module>
ask_supports_thread()
File "/private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi/setup.py", line 49, in ask_supports_thread
ok = config.try_compile('__thread int some_threadlocal_variable_42;')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/config.py", line 230, in try_compile
self._check_compiler()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/config.py", line 103, in _check_compiler
customize_compiler(self.compiler)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 171, in customize_compiler
_osx_support.customize_compiler(_config_vars)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 418, in customize_compiler
_find_appropriate_compiler(_config_vars)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_osx_support.py", line 191, in _find_appropriate_compiler
"Cannot locate working compiler")
SystemError: Cannot locate working compiler
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/gY/gYFQRMkVEYeji6ED8rcjFE+++TI/-Tmp-/pip_build_Farrell/cffi
Storing debug log for failure in /Users/Farrell/.pip/pip.log
Edit: Here is the result when I try to 'brew install python':
$ brew install python
Error: /usr/local/Library/Formula/openssl.rb:128: syntax error, unexpected ',', expecting kEND
Please report this bug:
http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:65:in require'
/usr/local/Library/Homebrew/formulary.rb:65:inklass'
/usr/local/Library/Homebrew/formulary.rb:50:in get_formula'
/usr/local/Library/Homebrew/formulary.rb:198:infactory'
/usr/local/Library/Homebrew/dependency.rb:32:in to_formula'
/usr/local/Library/Homebrew/dependency.rb:88:inexpand'
/usr/local/Library/Homebrew/dependencies.rb:9:in each'
/usr/local/Library/Homebrew/dependencies.rb:9:ineach'
/usr/local/Library/Homebrew/dependency.rb:76:in expand'
/usr/local/Library/Homebrew/formula.rb:501:inrecursive_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:98:in verify_deps_exist'
/usr/local/Library/Homebrew/formula_installer.rb:91:inprelude'
/usr/local/Library/Homebrew/cmd/install.rb:144:in install_formula'
/usr/local/Library/Homebrew/cmd/install.rb:67:ininstall'
/usr/local/Library/Homebrew/cmd/install.rb:67:in each'
/usr/local/Library/Homebrew/cmd/install.rb:67:ininstall'
/usr/local/Library/brew.rb:136:in `send'
/usr/local/Library/brew.rb:136
You probably missed
brew install pythonYou can check more details from http://docs.python-guide.org/en/latest/starting/install/osx/