Everyone in the use of Python, many times the import module will find that the module does not exist, then we need to download the installation, but sometimes the installation will appear a variety of problems, we go back to consult others, most programmers will answer you: Pip install what, but you pip install What did you find without the order, and what's going on? Because the person who told you has never considered whether or not you are loading a PIP command. The following small part is said small how to install Scray with PIP:
Let's say you installed the following.
Python 2.7
- Python Package:pip and Setuptools. The PIP now relies on setuptools, and if it is not installed, Setuptools is automatically installed.
- lxml. Most Linux distributions bring their own lxml. If missing, see http://lxml.de/installation.html
- OpenSSL. Systems other than Windows (see the Platform Installation Guide) are already available.
You can use Pip to install Scrapy, etc. (it is recommended to use PIP to install the Python package).
To install using PIP:
Pip Install Scrapy
Platform Installation Guide
Windows
Install Python 2.7 from the http://python.org/download/.
You need to modify the PATH environment variable to add Python's executable program and additional scripts to the system path. Add the following path to path:
C:\Python27\; C:\Python27\Scripts\;
Please open the command line and run the following command to modify the PATH:
C:\python27\python. EXE C:\python27\tools\scripts\win_add2path. Py
Close and reopen the command-line window to make it effective. Run the next command to confirm the desired Python version of its output:
Python --version
Installing Pywin32 from http://sourceforge.net/projects/pywin32/
Please make sure to download the version that matches your system (Win32 or AMD64)
- Installing PIP from https://pip.pypa.io/en/latest/installing.html
Open a command-line window and confirm that the PIP is installed correctly:
Pip --version
- So far Python 2.7 and Pip have been able to run correctly. Next Install Scrapy:
Pip Install Scrapy
Ubuntu 9.10 and above version
instead of using Ubuntu-provided python-scrapy, the package version is too old and runs slower than the latest version of Scrapy.
You can use the officially provided Ubuntu Packages. The package resolves all dependency issues and remains updated with the latest bug fixes.
ArchLinux
You can install scrapy in a generic manner or from the AUR scrapy Package:
Yaourt -S scrapy
The main source of this paper is http://scrapy-chs.readthedocs.io/zh_CN/latest/intro/install.html, forbidden reprint
Python pip command installation and experimental installation Scrapy