2009-01-06 14:34:26 +00:00
.. _intro-install:
2009-01-06 00:15:55 +00:00
2009-04-10 05:35:53 +00:00
==================
Installation guide
==================
2012-08-29 15:37:05 -03:00
Pre-requisites
2010-11-17 21:32:23 -02:00
==============
2009-04-11 18:34:44 +00:00
2012-08-29 15:37:05 -03:00
The installation steps assume that you have the following things installed:
2008-12-16 14:58:52 +00:00
2013-10-29 13:44:00 -02:00
* `Python`_ 2.7
2013-09-09 12:44:26 -03:00
* `lxml`_ . Most Linux distributions ships prepackaged versions of lxml. Otherwise refer to http://lxml.de/installation.html
* `OpenSSL`_ . This comes preinstalled in all operating systems except Windows (see :ref: `intro-install-platform-notes` )
2012-08-29 15:37:05 -03:00
* `pip`_ or `easy_install`_ Python package managers
2008-12-16 14:58:52 +00:00
2012-08-29 15:37:05 -03:00
Installing Scrapy
=================
2008-12-16 14:58:52 +00:00
2012-08-29 15:37:05 -03:00
You can install Scrapy using easy_install or pip (which is the canonical way to
distribute and install Python packages).
2009-04-11 18:34:44 +00:00
2012-08-29 15:37:05 -03:00
.. note :: Check :ref: `intro-install-platform-notes` first.
2009-04-11 18:34:44 +00:00
2012-08-29 15:37:05 -03:00
To install using pip::
2009-01-26 23:28:19 +00:00
2012-08-29 15:37:05 -03:00
pip install Scrapy
2009-04-10 11:01:56 +00:00
2012-08-29 15:37:05 -03:00
To install using easy_install::
2009-05-19 01:50:44 -03:00
2012-08-29 15:37:05 -03:00
easy_install Scrapy
2008-12-16 15:40:27 +00:00
2012-08-29 15:37:05 -03:00
.. _intro-install-platform-notes:
2008-12-16 15:40:27 +00:00
2012-08-29 15:37:05 -03:00
Platform specific installation notes
====================================
2008-12-16 15:40:27 +00:00
2012-08-29 15:37:05 -03:00
Windows
-------
2009-09-29 09:44:02 -03:00
2012-08-29 15:37:05 -03:00
After installing Python, follow these steps before installing Scrapy:
2008-12-16 15:40:27 +00:00
2012-08-29 15:37:05 -03:00
* add the `` C:\python27\Scripts `` and `` C:\python27 `` folders to the system
path by adding those directories to the `` PATH `` environment variable from
the `Control Panel`_ .
2009-09-29 08:41:34 -03:00
2012-08-29 15:44:24 -03:00
* install OpenSSL by following these steps:
2008-12-16 15:40:27 +00:00
2012-09-13 15:26:45 -03:00
1. go to `Win32 OpenSSL page <http://slproweb.com/products/Win32OpenSSL.html> `_
2009-03-22 22:05:23 +00:00
2012-08-29 15:37:05 -03:00
2. download Visual C++ 2008 redistributables for your Windows and architecture
2009-09-29 09:44:02 -03:00
2012-08-29 15:37:05 -03:00
3. download OpenSSL for your Windows and architecture (the regular version, not the light one)
2009-03-22 22:05:23 +00:00
2012-08-29 15:37:05 -03:00
4. add the `` c:\openssl-win32\bin `` (or similar) directory to your `` PATH `` , the same way you added `` python27 `` in the first step`` in the first step
2009-03-22 22:05:23 +00:00
2012-08-29 15:44:24 -03:00
* some binary packages that Scrapy depends on (like Twisted, lxml and pyOpenSSL) require a compiler available to install, and fail if you don't have Visual Studio installed. You can find Windows installers for those in the following links. Make sure you respect your Python version and Windows architecture.
2008-12-16 15:40:27 +00:00
2012-08-29 15:37:05 -03:00
* pywin32: http://sourceforge.net/projects/pywin32/files/
* Twisted: http://twistedmatrix.com/trac/wiki/Downloads
2012-09-13 15:26:45 -03:00
* zope.interface: download the egg from `zope.interface pypi page <http://pypi.python.org/pypi/zope.interface> `_ and install it by running `` easy_install file.egg ``
2012-08-29 15:37:05 -03:00
* lxml: http://pypi.python.org/pypi/lxml/
* pyOpenSSL: https://launchpad.net/pyopenssl
2009-09-29 08:41:34 -03:00
2013-03-13 03:18:33 -03:00
Finally, this page contains many precompiled Python binary libraries, which may
come handy to fulfill Scrapy dependencies:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
2010-11-17 21:32:23 -02:00
Ubuntu 9.10 or above
~~~~~~~~~~~~~~~~~~~~
2009-09-29 08:41:34 -03:00
2012-08-29 15:37:05 -03:00
**Don't** use the `` python-scrapy `` package provided by Ubuntu, they are
typically too old and slow to catch up with latest Scrapy.
2010-11-17 21:32:23 -02:00
2012-08-29 15:37:05 -03:00
Instead, use the official :ref: `Ubuntu Packages <topics-ubuntu>` , which already
solve all dependencies for you and are continuously updated with the latest bug
fixes.
2008-12-16 15:40:27 +00:00
2013-09-09 12:44:26 -03:00
2010-11-17 21:32:23 -02:00
.. _Python: http://www.python.org
2012-08-29 15:37:05 -03:00
.. _pip: http://www.pip-installer.org/en/latest/installing.html
.. _easy_install: http://pypi.python.org/pypi/setuptools
2010-11-17 21:32:23 -02:00
.. _Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
2013-09-09 12:44:26 -03:00
.. _lxml: http://lxml.de/
.. _OpenSSL: https://pypi.python.org/pypi/pyOpenSSL