How do you install Scrapy in Anaconda?
In this chapter, we will discuss how to install and set up Scrapy. Scrapy must be installed with Python. Show Scrapy can be installed by using pip. To install, run the following command − pip install Scrapy WindowsNote − Python 3 is not supported on Windows OS. Step 1 − Install Python 2.7 from Python Set environmental variables by adding the following paths to the PATH − C:\Python27\;C:\Python27\Scripts\; You can check the Python version using the following command − python --version Step 2 − Install OpenSSL. Add C:\OpenSSL-Win32\bin in your environmental variables. Note − OpenSSL comes preinstalled in all operating systems except Windows. Step 3 − Install Visual C++ 2008 redistributables. Step 4 − Install pywin32. Step 5 − Install pip for Python versions older than 2.7.9. You can check the pip version using the following command − pip --version Step 6 − To install scrapy, run the following command − pip install Scrapy AnacondaIf you have anaconda or miniconda installed on your machine, run the below command to install Scrapy using conda − conda install -c scrapinghub scrapy Scrapinghub company supports official conda packages for Linux, Windows, and OS X. Note − It is recommended to install Scrapy using the above command if you have issues installing via pip. Ubuntu 9.10 or AboveThe latest version of Python is pre-installed on Ubuntu OS. Use the Ubuntu packages aptgettable provided by Scrapinghub. To use the packages − Step 1 − You need to import the GPG key used to sign Scrapy packages into APT keyring − sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 627220E7 Step 2 − Next, use the following command to create /etc/apt/sources.list.d/scrapy.list file − echo 'deb http://archive.scrapy.org/ubuntu scrapy main' | sudo tee /etc/apt/sources.list.d/scrapy.list Step 3 − Update package list and install scrapy − sudo apt-get update && sudo apt-get install scrapy ArchlinuxYou can install Scrapy from AUR Scrapy package using the following command − yaourt -S scrapy Mac OS XUse the following command to install Xcode command line tools − C:\Python27\;C:\Python27\Scripts\;0 Instead of using system Python, install a new updated version that doesn't conflict with the rest of your system. Step 1 − Install homebrew. Step 2 − Set environmental PATH variable to specify that homebrew packages should be used before system packages − If you already have installed Anaconda or Miniconda, the company Scrapinghub maintains official conda packages for Linux, Windows and OS X. To install Scrapy using conda, run:
Ubuntu 9.10 or above Use the official Ubuntu Packages, which already solve all dependencies for you and are continuously updated with the latest bug fixes. If you prefer to build the python dependencies locally instead of relying on system packages you’ll need to install their required non-python dependencies first:
You can install Scrapy with 2 after that:
Archlinux You can follow the generic instructions or install Scrapy from AUR Scrapy package:
Windows
Follow This steps to install scrapy on windows:
Mac OS X Building Scrapy’s dependencies requires the presence of a C compiler and development headers. On OS X this is typically provided by Apple’s Xcode development tools. To install the Xcode command line tools open a terminal window and run:
There’s a known issue that prevents 2 from updating system packages. This has to be addressed to successfully install Scrapy and its dependencies. Here are some proposed solutions:
|