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
|
|
|
|
==================
|
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
Installing Scrapy
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. note:: Check :ref:`intro-install-platform-notes` first.
|
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
|
2008-12-16 14:58:52 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
* `pip`_ and `setuptools`_ Python packages. Nowadays `pip`_ requires and
|
|
|
|
installs `setuptools`_ if not installed.
|
2008-12-16 14:58:52 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
* `lxml`_. Most Linux distributions ships prepackaged versions of lxml.
|
|
|
|
Otherwise refer to http://lxml.de/installation.html
|
2009-04-11 18:34:44 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
* `OpenSSL`_. This comes preinstalled in all operating systems, except Windows
|
|
|
|
where the Python installer ships it bundled.
|
|
|
|
|
|
|
|
You can install Scrapy using pip (which is the canonical way to install Python
|
|
|
|
packages).
|
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
|
|
|
.. _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
|
|
|
|
2015-02-06 22:46:18 +05:30
|
|
|
* Install Python 2.7 from https://www.python.org/downloads/
|
2014-08-08 18:07:38 -03:00
|
|
|
|
|
|
|
You need to adjust ``PATH`` environment variable to include paths to
|
|
|
|
the Python executable and additional scripts. The following paths need to be
|
|
|
|
added to ``PATH``::
|
2008-12-16 15:40:27 +00:00
|
|
|
|
2014-11-05 22:49:40 -02:00
|
|
|
C:\Python27\;C:\Python27\Scripts\;
|
2009-09-29 08:41:34 -03:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
To update the ``PATH`` open a Command prompt and run::
|
2008-12-16 15:40:27 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
c:\python27\python.exe c:\python27\tools\scripts\win_add2path.py
|
2009-03-22 22:05:23 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
Close the command prompt window and reopen it so changes take effect, run the
|
|
|
|
following command and check it shows the expected Python version::
|
2009-09-29 09:44:02 -03:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
python --version
|
2009-03-22 22:05:23 +00:00
|
|
|
|
2014-11-05 23:05:51 -02:00
|
|
|
* Install `pywin32` from http://sourceforge.net/projects/pywin32/
|
|
|
|
|
|
|
|
Be sure you download the architecture (win32 or amd64) that matches your system
|
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
* Install `pip`_ from https://pip.pypa.io/en/latest/installing.html
|
2009-03-22 22:05:23 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
Now open a Command prompt to check ``pip`` is installed correctly::
|
2008-12-16 15:40:27 +00:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
pip --version
|
2009-09-29 08:41:34 -03:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
* At this point Python 2.7 and ``pip`` package manager must be working, let's
|
|
|
|
install Scrapy::
|
2013-03-13 03:18:33 -03:00
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
pip install Scrapy
|
2013-03-13 03:18:33 -03:00
|
|
|
|
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
|
|
|
|
2014-08-08 18:07:38 -03:00
|
|
|
Archlinux
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
|
|
You can follow the generic instructions or install Scrapy from `AUR Scrapy package`::
|
|
|
|
|
|
|
|
yaourt -S scrapy
|
|
|
|
|
2013-09-09 12:44:26 -03:00
|
|
|
|
2015-02-06 22:46:18 +05:30
|
|
|
.. _Python: https://www.python.org/
|
|
|
|
.. _pip: https://pip.pypa.io/en/latest/installing.html
|
2012-08-29 15:37:05 -03:00
|
|
|
.. _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
|
2014-08-08 18:07:38 -03:00
|
|
|
.. _setuptools: https://pypi.python.org/pypi/setuptools
|
|
|
|
.. _AUR Scrapy package: https://aur.archlinux.org/packages/scrapy/
|